in reply to How to use identity files in Net::SFTP

Hello thanks for the reply.
I have modified my code like this:
my $targetserver = 'files.responsys.net'; my $sftp = Net::SFTP->new( $targetserver, user => 'canneu_scp', ssh_args => { identity_files => [ '/tmp/responsys/capgemini.private' ], debug => 1, } ) or die "could not open connection to $targetserver\n";
Now when I run this, I am getting the following error:
can-ornstein:[/tmp/responsys] ./testftp.pl can-ornstein: Reading configuration data /home/home2/cgmjoshi/.ssh/con +fig can-ornstein: Reading configuration data /etc/ssh_config can-ornstein: Connecting to files.responsys.net, port 22. can-ornstein: Remote protocol version 2.0, remote software version Ope +nSSH_5.2 can-ornstein: Net::SSH::Perl Version 1.34, protocol version 2.0. .an-ornstein: No compat match: OpenSSH_5.2 can-ornstein: Connection established. can-ornstein: Sent key-exchange init (KEXINIT), wait response. can-ornstein: Algorithms, c->s: 3des-cbc hmac-sha1 none can-ornstein: Algorithms, s->c: 3des-cbc hmac-sha1 none can-ornstein: Entering Diffie-Hellman Group 1 key exchange. can-ornstein: Sent DH public key, waiting for reply. Key class 'Net::SSH::Perl::Key::DSA' is unsupported: Math::BigInt vers +ion 1.78 required--this is only version 1.70 at /usr/lib/perl5/vendor +_perl/5.8.5/Crypt/DSA/KeyChain.pm line 4, <GEN0> line 1. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.5/ +Crypt/DSA/KeyChain.pm line 4, <GEN0> line 1. Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.5/Cryp +t/DSA.pm line 7, <GEN0> line 1. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.5/ +Crypt/DSA.pm line 7, <GEN0> line 1. Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.5/Net/ +SSH/Perl/Key/DSA.pm line 14, <GEN0> line 1. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.5/ +Net/SSH/Perl/Key/DSA.pm line 14, <GEN0> line 1. Compilation failed in require at (eval 23) line 1, <GEN0> line 1. BEGIN failed--compilation aborted at (eval 23) line 1, <GEN0> line 1.
The versions I am using are:
perl-Net-SFTP-0.10-1.el4.rf perl-Net-SSH-Perl-1.34-1.el4.rf perl-Math-Pari-2.01080603-1.el4.rf perl-Math-GMP-2.05-1.el4.rf
Can anyone help how to get rid of this error?

Replies are listed 'Best First'.
Re^2: How to use identity files in Net::SFTP
by salva (Canon) on Oct 20, 2010 at 16:06 UTC