in reply to SFTP connection failure with Perl “Net::SFTP” module
Hello Michaels,
I would suggest to comment out the identity_files and also password. Simply do this:
#!/usr/bin/perl use strict; use warnings; use Net::SFTP; my $host = '127.0.0.1'; my %args = ( user => 'user', ssh_args => [ port => "10022" ] ); my $sftp = Net::SFTP->new($host, %args); my $ls = $sftp->ls('/sample/path'); print "$_->{filename}\n" for (@$ls);
I would also suggest to use the module Net::SFTP::Foreign. You can find more information as to why on a previoudly asked question Re: Using Net::SFTP.
Hope this helps, BR.
Seeking for Perl wisdom...on the process of learning...not there...yet!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: SFTP connection failure with Perl “Net::SFTP” module
by Michaels (Novice) on May 06, 2019 at 08:34 UTC | |
by thanos1983 (Parson) on May 06, 2019 at 09:15 UTC | |
by Michaels (Novice) on May 06, 2019 at 09:25 UTC | |
by thanos1983 (Parson) on May 06, 2019 at 09:42 UTC |
In Section
Seekers of Perl Wisdom