Posted on 2008-10-29 19:44:03-07 by userlame
protocol error
I'm not sure if this is a bug or I'm just missing something (I guess the latter). When trying to connect to 4 different ssh servers, I see the following:

Test command:
[luser@nihal]$ perl -MNet::SSH::Perl -e '$ssh = new Net::SSH::Perl("10.0.0.1", \ debug => "1", protocol => "2", port => "4400", identity => "/home/luser/.ssh/id_rsa"); \ ($out, $err, $rv) = $ssh->cmd("echo foo"); print "out is $out\nerr is $err\nrv is $rv\n";'


output:
nihal: Reading configuration data /home/luser/.ssh/config nihal: Reading configuration data /etc/ssh_config nihal: Connecting to 10.0.0.1, port 4400. nihal: Remote protocol version 2.0, remote software version OpenSSH_4.3 nihal: Net::SSH::Perl Version 1.33, protocol version 2.0. nihal: No compat match: OpenSSH_4.3. nihal: Connection established. nihal: channel 0: new [client-session] nihal: Requesting channel_open for channel 0. nihal: Entering interactive session. out is err is rv is


Logged on the ssh server:
Oct 29 20:12:18 mirzam sshd[32611]: Disconnecting: protocol error: rcvd type 90


The log message is generated on centos openssh 4.3, but not on gentoo openssh 4.7 (no relevant logs at all even at DEBUG3 there).

Any ideas are appreciated.
Direct Responses: 9159 | Write a response
Posted on 2008-10-30 04:08:39-07 by userlame in response to 9157
Re: protocol error
Yup, my bad if anyone comes across the post. I simply didn't call login() before cmd() - I incorrectly assumed from the docs that it was automatically called on cmd() if needed. I got that from reading the section regarding SSH1 forcing connection and disconnection on each cmd(). Woops.
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.