Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: NET SFTP disconnects

by thanos1983 (Parson)
on Apr 12, 2019 at 09:34 UTC ( [id://1232476]=note: print w/replies, xml ) Need Help??


in reply to Re: NET SFTP disconnects
in thread NET SFTP disconnects

Hello DesmondL,

Welcome to the Monastery. I am not the expert here (far from that), fellow Monk salva is. If I am not mistaken he also is the author of the package Net::SFTP::Foreign.

Having said that, I would propose to modify the script with the following part:

my %args = ( host => "localhost", user => "user", port => "22", # psw => "psw", more => [qw(-o PreferredAuthentications=publickey)], key_path => "/home/user/.ssh/id_rsa" ); my $sftp = Net::SFTP::Foreign->new(%args); $sftp->die_on_error("Unable to establish SFTP connection");

Modify the parameters to your needs.

Hope this helps, BR

Seeking for Perl wisdom...on the process of learning...not there...yet!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1232476]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-23 11:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found