Net-SSH-Perl - Problem establishing connection

Posted on Fri May 12 16:16:53 2006 by gordo
Problem establishing connection

I'm trying to establish a connection with a remote server (OpenSSH, port 22, cygwin emulator). The remote server seems to be working correctly, as I can log in with psftp without problems. When trying to connect via my script, however, the following debug output is generated (IP changed here):

minotaur.skylist.net: Reading configuration data /root/.ssh/config minotaur.skylist.net: Reading configuration data /etc/ssh_config minotaur.skylist.net: Allocated local port 1023. minotaur.skylist.net: Connecting to 123.123.1.123, port 22. minotaur.skylist.net: Remote protocol version ., remote software version minotaur.skylist.net: Net::SSH::Perl Version 1.28, protocol version 1.5. minotaur.skylist.net: No compat match: . minotaur.skylist.net: Connection established. minotaur.skylist.net: Waiting for server public key.

Then the program dies with:

Connection closed by remote host. at /usr/local/lib/perl5/site_perl/5.8.6/Net/SSH/Perl/SSH1.pm line + 75

My connection code is:

%params = ( debug => 1, protocol => 1 ); $ssh = Net::SSH::Perl->new( $url, %params ); $ssh->login( $user, $password ) or die "Couldn't connect."; my($stdout, $stderr, $exit) = $ssh->cmd( "ls" );

Does anyone have any ideas what might be causing the issue? The "Remote protocol version ., remote software version" seems to indicate that the module is unable to detect the protocol version and software version used by the server, since the server is up and able to be accessed by client. Thanks for any help anyone can provide.

Lance Woodson
Direct Responses: 2356 | Write a response