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!
In Section
Seekers of Perl Wisdom