Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^2: NET SFTP disconnects

by thanos1983 (Parson)
on Apr 12, 2019 at 09:34 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2021-04-10 21:20 GMT
Find Nodes?
    Voting Booth?

    No recent polls found