in reply to Net::SSH::Perl question
FWIW - your script works fine on my system: CentOS 5.3, perl v5.10.0, Net::SSH::Perl 1.34 and open-ssh 4.3p2-29.
Reason 2 is SSH_OPEN_CONNECT_FAILED (see rfc4254). This is an error indication from the server back to the client. To find the cause of the failure you should investigate your ssh server. Maybe it is logging an error. Maybe you can run the server with debug option to get more information.
update: There is something odd about your debug output. On my system I get:
Login completed, opening dummy shell channel. channel 0: new [client-session] Requesting channel_open for channel 0. channel 0: open confirm rwindow 0 rmax 32768 Got channel open confirmation, requesting shell. Requesting service shell on channel 0. channel 1: new [client-session] Requesting channel_open for channel 1. Entering interactive session.
The messages Login completed, opening dummy shell channel. and Got channel open confirmation, requesting shell. are both produced by the login method of Net::SSH::Perl::SSH2.pm. I have checked the source code on CPAN and the latter message is in every version back to 1.24 released back in 2003. Yet your trace doesn't have this second message. Recent versions have added a third argument to the login method to prevent opening a shell, but you have not used the third argument so the latter message should be there. I don't see any other path that would avoid the production of the latter message.
This suggests that your version of Net::SSH::Perl is not as on CPAN. You may have a version modified by your distribution provider or you may have a corrupt version. You might try installing Net::SSH::Perl from CPAN and see what happens.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::SSH::Perl question
by 2007fld (Acolyte) on Aug 04, 2009 at 19:05 UTC | |
by ig (Vicar) on Aug 04, 2009 at 20:28 UTC |