briandfoy / net-ssh-perl

Development on the Net::SSH::Perl module to support latest ciphers, key exchange mechanisms, etc.
Other
4 stars 1 forks source link

zlib mismatch in Kex with SSH 2 #40

Open briandfoy opened 1 year ago

briandfoy commented 1 year ago

This ticket was imported from rt.cpan.org 78601

If I use Net::SSH::Perl to connect to an ssh server on CENTOS5, or on a Juniper appliance, and use SSH 2 with compression enabled (which is the default in Juniper's Perl API), I get a negotiation failure in kex for zlib comprssion

example:

use Net::SSH::Perl ;
my %param ;

$param{debug} = 1 ;
$param{compression} = 1 ;
$param{protocol} = '2' ;

my $ssh = Net::SSH::Perl->new("example.com",%param);
$ssh->login("foo", "bar");
($out, $err, $exit) = $ssh->cmd("uptime");
print "$out" ;
client: Connecting to example.com, port 22.
client: Remote protocol version 1.99, remote software version OpenSSH_4.4
client: Net::SSH::Perl Version 1.34, protocol version 2.0.
client: No compat match: OpenSSH_4.4.
client: Connection established.
client: Sent key-exchange init (KEXINIT), wait response.
No matching comp found: client zlib server none,zlib@openssh.com at /usr/lib/perl5/vendor_perl/5.8.8/Net/SSH/Perl/SSH2.pm line 92

regards

-- Andrew Daviel, TRIUMF, Canada Tel. +1 (604) 222-7376 (Pacific Time) Network Security Manager