Subject: | SSH Protocol 2 not working |
I am able to use Net::SSH::Perl v1.30 to connect to hosts that allow SSH
protocol 1. However we have hardened many of our servers so they only
accept protocol 2, not 1, since 1 is really not that secure. (we are
using CentOS 3 and 4 primarily, free clone of RedHat Enterprise)
My test script does not specify what protocols to use so "1,2" should be
the default (actually I did try specifying "2" or "2,1" but it didn't
help so I went back to using the defaults)...
On any server that is only accepting protocol 2, I get this error:
Connection closed by remote host. at
/usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Kex/DH1.pm line 41
I have all of the pre-req modules installed including Math::GMP as well
as IO::Handle, as was previously suggested in bug report #14341... I
have not had much luck with Net::SSH2 yet (definitely need to go with
username/password authentication here, not keys) but I'm still messing
with it as well.
If I use the example cmd.pl that comes with Net::SSH::Perl here's a bit
more output:
jeremydev: Reading configuration data /root/.ssh/config
jeremydev: Reading configuration data /etc/ssh_config
jeremydev: Allocated local port 1023.
jeremydev: Connecting to 10.6.6.166, port 22.
jeremydev: Remote version string: SSH-2.0-OpenSSH_3.6.1p2
jeremydev: Remote protocol version 2.0, remote software version
OpenSSH_3.6.1p2
jeremydev: Net::SSH::Perl Version 1.30, protocol version 2.0.
jeremydev: No compat match: OpenSSH_3.6.1p2.
jeremydev: Connection established.
Enter your username on that host: [root] jeremy
And your password:
jeremydev: Sent key-exchange init (KEXINIT), wait response.
jeremydev: Algorithms, c->s: 3des-cbc hmac-sha1 none
jeremydev: Algorithms, s->c: 3des-cbc hmac-sha1 none
jeremydev: Entering Diffie-Hellman Group 1 key exchange.
jeremydev: Sent DH public key, waiting for reply.
Connection closed by remote host. at
/usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Kex/DH1.pm line 41
Thanks,
Jeremy