[Ssh-sftp-perl-users] Problems connecting to one site but not another
Brought to you by:
dbrobins
From: Ian D. <Ian...@bd...> - 2008-01-24 16:51:49
|
I have a very simple script that connects to a server (domain1) but on trying to configure it to a new site (domain2) I get an error. =20 Manual connection via SSH works OK for both sites, it is just the script that has trouble. Here is the script configured for domain2 =20 #!/usr/bin/perl -w use strict; use warnings; =20 use Net::FTP; use Net::SFTP; =20 my $ftp; =20 eval { $ftp =3D Net::SFTP->new('domain2.com', user =3D> 'myuser', debug =3D> 1, ); }; =20 if ($@) { print "login failed [$@]\n"; } 1; =20 Error output is =20 login failed [Key class 'Net::SSH::Perl::Key::RSA' is unsupported: Can't locate Compress/Raw/Zlib.pm in @INC (@INC contains: <snip> .) at /work/perl-modules/lib/Compress/Zlib.pm line 12. BEGIN failed--compilation aborted at /work/perl-modules/lib/Compress/Zlib.pm line 12. Compilation failed in require at /work/perl-modules/lib/Convert/ASCII/Armour.pm line 15. BEGIN failed--compilation aborted at /work/perl-modules/lib/Convert/ASCII/Armour.pm line 15. Compilation failed in require at /work/perl-modules/lib/Crypt/RSA.pm line 20. BEGIN failed--compilation aborted at /work/perl-modules/lib/Crypt/RSA.pm line 20. Compilation failed in require at /work/perl-modules/lib/Net/SSH/Perl/Key/RSA.pm line 15. BEGIN failed--compilation aborted at /work/perl-modules/lib/Net/SSH/Perl/Key/RSA.pm line 15. Compilation failed in require at (eval 24) line 1. BEGIN failed--compilation aborted at (eval 24) line 1. =20 The point here is that we have never had to use Compress::Zlib before (on any of our other site connections) so why do we need it now. (Installing it does not seem to be an option for reasons I don't want to go into at the moment!) =20 Comparing the full (debug) output from the two servers, here is the output for the successful connection. =20 localhost: Reading configuration data /home/username/.ssh/config localhost: Reading configuration data /etc/ssh_config localhost: Connecting to domain1.com, port 22. localhost: Remote version string: SSH-1.99-OpenSSH_3.7.1p2 =20 localhost: Remote protocol version 1.99, remote software version OpenSSH_3.7.1p2 localhost: Net::SSH::Perl Version 1.30, protocol version 2.0. localhost: No compat match: OpenSSH_3.7.1p2. localhost: Connection established. localhost: Sent key-exchange init (KEXINIT), wait response. localhost: Algorithms, c->s: 3des-cbc hmac-sha1 none localhost: Algorithms, s->c: 3des-cbc hmac-sha1 none localhost: Entering Diffie-Hellman Group 1 key exchange. localhost: Sent DH public key, waiting for reply. localhost: Received host key, type 'ssh-dss'. localhost: Host 'domain1.com' is known and matches the host key. localhost: Computing shared secret key. localhost: Verifying server signature. localhost: Waiting for NEWKEYS message. localhost: Enabling incoming encryption/MAC/compression. localhost: Send NEWKEYS, enable outgoing encryption/MAC/compression. localhost: Sending request for user-authentication service. localhost: Service accepted: ssh-userauth. localhost: Trying empty user-authentication request. localhost: Authentication methods that can continue: publickey,password,keyboard-interactive. localhost: Next method to try is publickey. localhost: Trying pubkey authentication with key file '/home/username/.ssh/id_dsa' localhost: Login completed, opening dummy shell channel. localhost: channel 0: new [client-session] localhost: Requesting channel_open for channel 0. localhost: channel 0: open confirm rwindow 0 rmax 32768 localhost: channel 1: new [client-session] localhost: Requesting channel_open for channel 1. localhost: Sending subsystem: sftp localhost: Requesting service subsystem on channel 1. localhost: channel 1: open confirm rwindow 0 rmax 32768 localhost: sftp: Sending SSH2_FXP_INIT localhost: sftp: Remote version: 3 =20 Whereas here is the full output for the failed connection. =20 localhost: Reading configuration data /home/username/.ssh/config localhost: Reading configuration data /etc/ssh_config localhost: Connecting to domain2.com, port 22. localhost: Remote version string: SSH-2.0-JSCAPE3.4.0 =20 localhost: Remote protocol version 2.0, remote software version JSCAPE3.4.0 localhost: Net::SSH::Perl Version 1.30, protocol version 2.0. localhost: No compat match: JSCAPE3.4.0 localhost: Connection established. localhost: Sent key-exchange init (KEXINIT), wait response. localhost: Algorithms, c->s: 3des-cbc hmac-sha1 none localhost: Algorithms, s->c: 3des-cbc hmac-sha1 none localhost: Entering Diffie-Hellman Group 1 key exchange. localhost: Sent DH public key, waiting for reply. login failed [Key class 'Net::SSH::Perl::Key::RSA' is unsupported: Can't locate Compress/Raw/Zlib.pm in @INC (@INC contains: <snip> .) at /work/perl-modules/lib/Compress/Zlib.pm line 12. BEGIN failed--compilation aborted at /work/perl-modules/lib/Compress/Zlib.pm line 12. Compilation failed in require at /work/perl-modules/lib/Convert/ASCII/Armour.pm line 15. BEGIN failed--compilation aborted at /work/perl-modules/lib/Convert/ASCII/Armour.pm line 15. Compilation failed in require at /work/perl-modules/lib/Crypt/RSA.pm line 20. BEGIN failed--compilation aborted at /work/perl-modules/lib/Crypt/RSA.pm line 20. Compilation failed in require at /work/perl-modules/lib/Net/SSH/Perl/Key/RSA.pm line 15. BEGIN failed--compilation aborted at /work/perl-modules/lib/Net/SSH/Perl/Key/RSA.pm line 15. Compilation failed in require at (eval 24) line 1. BEGIN failed--compilation aborted at (eval 24) line 1. =20 What then is likely to be the difference between domain1.com and domain2.com that is causing our local script To fail in this way? =20 Regards Ian This email is confidential and intended solely for the use of the individ= ual to whom it is addressed. Any views or opinions presented are solely t= hose of the author and do not necessarily represent those of RedBee Media= Metadata. If you are not the intended recipient, be advised that you hav= e received this email in error and that any use, dissemination, forwardin= g, printing, or copying of this email is strictly prohibited. If you have= received this email in error please notify the sender. Red Bee Media Metadata is a trading name of Broadcasting Dataservices Lim= ited.=20 Registered in England and Wales No.: 2554733. Registered Office: 201 Wood= Lane, London W12 7TP, UK.=20 Broadcasting Dataservices Limited is a wholly owned subsidiary of Red Bee= Media Limited. |