in reply to Re^3: Net::SFTP::Foreign is slow
in thread Net::SFTP::Foreign is slow

Hi Rob,

I am getting an error "Invalid option 'key_path' or bad combination of options". Can you please advise.

use Net::SFTP::Foreign 1.67; use Net::SFTP::Foreign::Backend::Net_SSH2 0.04; my $sftp = Net::SFTP::Foreign->new( host => 'delivery.myserver.com', port => '22', backend => 'Net_SSH2', user => 'ftp_user', key_path => "mytransaction.private +.key"); $sftp->die_on_error("Unable to establish SFTP connection");

Replies are listed 'Best First'.
Re^5: Net::SFTP::Foreign is slow
by salva (Canon) on Jul 13, 2011 at 09:36 UTC
    There was a bug on Net::SFTP::Foreign::Backend::Net_SSH2 0.04.

    Get the new 0.05 I have just uploaded to CPAN or just use privatekey instead of key_path:

    my $sftp = Net::SFTP::Foreign->new( host => 'delivery.myserver.com', port => '22', backend => 'Net_SSH2', user => 'ftp_user', privatekey => "mytransaction.priva +te.key");
      Get the new 0.05 ...

      0.05 has now been uploaded to the sisyphusion repo.
      Of course, Net::SFTP::Foreign::Backend::Net_SSH2 (like Net::SFTP::Foreign) is pure perl, so it's quite simple to install from source once the pre-requisite Net::SSH2 has been installed ... but I'd just as soon put up the ppm package and leave it at that :-)

      Cheers,
      Rob
        Hi Rob, I have just replaced the Net_SSH2.pm file and using privatekey option and getting a new error "authentication failed: (0)". Please advise.