Automation

last person joined: 4 days ago 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
Expand all | Collapse all

Strange SSH error using Perl API (No matching comp found: client zlib server none,zlib@openssh.com)

  • 1.  Strange SSH error using Perl API (No matching comp found: client zlib server none,zlib@openssh.com)

    Posted 07-26-2012 17:47

    We have an SRX 3400 running Junos 10.4R3.4

    I have a desktop running SL5.2 (basically x86_64 CENTOS 5.2)


    I downloaded the Perl API junoscript-perl-10.4R3.4

    and tried to run the example get_chassis_inventory.

     

    When I try that, I get

    No matching comp found: client zlib server none,zlib@openssh.com at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/SSH2.pm line 97

    I was using the perl-Net-SSH-Perl 1.34 package from the standard Linux repositories, but if I build perl-Net-SSH-Perl-1.23-JUNOS from the API prerequsites I get exactly the same error.

    The error also appears in the syslog on the SRX, viz.

    sshd[23562]: fatal: no matching comp found: client zlib server none,zlib@openssh.com

    It seems to be something to do with the compression negotiated by Kex in SSH v 2

     

     

    If I hack site_perl/5.8.8/JUNOS/Access/ssh.pm and comment out compression, it works. Seems I ought to be able to pass compression=0 as a parameter to JUNOS::Device, but I'm not sure how

     

    Looks like it's really a bug in Net-SSH-Perl, so I'll try to report that, but I'd still like to know how to drive JUNOS::Device nicely

     



  • 2.  RE: Strange SSH error using Perl API (No matching comp found: client zlib server none,zlib@openssh.com)
    Best Answer

    Posted 07-26-2012 19:02

    I figured out how to turn off compression:

     

    my %deviceinfo = (
            access => $access,
            login => $login,
            password => $password,
            hostname => $hostname,
            'ssh-compress' => 0,
        );
    my $jnx = new JUNOS::Device(%deviceinfo);


    (need the quotes I think because the name has a minus in it)