Re: [Ssh-sftp-perl-users] Fwd: How to load my private DSA key for authentication?
Brought to you by:
dbrobins
From: Salvador F. <sfa...@ya...> - 2012-02-13 15:51:38
|
>________________________________ > From: Anthony Liu <ant...@ya...> >To: Salvador Fandino <sfa...@ya...> >Cc: "Ssh...@li..." <Ssh...@li...> >Sent: Monday, February 13, 2012 3:50 PM >Subject: Re: [Ssh-sftp-perl-users] Fwd: How to load my private DSA key for authentication? > > >Thanks for spotting that typo, but fixing that typo does not fix the problem. The exactly same problem remains: > > >Invalid option 'key_path' or bad combination of options at ./test.pl line 14 > > > >I have this version: Net-SFTP-Foreign-1.69 from http://search.cpan.org/~salva/Net-SFTP-Foreign-1.69/lib/Net/SFTP/Foreign.pm > > >And my perl is Strawberry Perl 5, version 12. I am not sure why the documentation doesn't say what combinations are accepted and what are not. I think my combination makes sense: > > >I do need to specify the port number, >I do need to specify the private key file path, >I do need to specify the user name, >I do need to specify the ssh command. That combination is supported, and it works for me: Y:\t\Net-SFTP-Foreign-1.69>type Y:\g\perl\p5-Net-SFTP-Foreign\samples\key_path.pl use strict; use warnings; use Net::SFTP::Foreign; print "This is Net::SFTP::Foreign $Net::SFTP::Foreign::VERSION running on perl $^V on $^O\n"; my $sftp = Net::SFTP::Foreign->new('10.0.2.2', key_path => 'Y:/.ssh/id_dsa_plink.ppk', port => 22, user => 'salva', ssh_cmd => 'C:/Archivos de Programa/PuTTY/plink.exe'); $sftp->error and die $sftp->error; my @g = $sftp->glob('/etc/pass*', names_only => 1); print "$_\n" for @g; Y:\t\Net-SFTP-Foreign-1.69>perl -Ilib Y:\g\perl\p5-Net-SFTP-Foreign\samples\key_path.pl This is Net::SFTP::Foreign 1.69 running on perl v5.12.3 on MSWin32 /etc/passwd /etc/passwd- Are you sure you don't have another version of Net::SFTP::Foreign installed that is being picked by perl instead of 1.69? Otherwise, try the latest development version of the module (1.70_06), add the following line to the beginning of your script: $Net::SFTP::Foreign::debug = ~0; Rerun it and send me the output. Include also its full, unmodified source code. |