I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-03-18 18:19:52-07 by rupprath
Net::SSH:W32Perl Hangs after login
I can connect to the system just fine and installed the BigInt modules to speed up the performance. However, once I am connected, the program just hangs. Here is the output from the debug:
: Reading configuration data C:/tmp/.ssh/config : Reading configuration data /etc/ssh_config : Connecting to XXXX.com, port 22. : Socket created, turning on blocking... : Remote version string: SSH-2.0-OpenSSH_4.2 : Remote protocol version 2.0, remote software version Ope : Net::SSH::Perl Version 1.30, protocol version 2.0. : No compat match: OpenSSH_4.2. : Connection established. : Sent key-exchange init (KEXINIT), wait response. : Algorithms, c->s: 3des-cbc hmac-sha1 none : Algorithms, s->c: 3des-cbc hmac-sha1 none : Entering Diffie-Hellman Group 1 key exchange. : Sent DH public key, waiting for reply. : Received host key, type 'ssh-dss'. : Host 'ats.vzbi.com' is known and matches the host key. : Computing shared secret key. : Verifying server signature. : Waiting for NEWKEYS message. : Enabling incoming encryption/MAC/compression. : Send NEWKEYS, enable outgoing encryption/MAC/compression : Sending request for user-authentication service. : Service accepted: ssh-userauth. : Trying empty user-authentication request. : Authentication methods that can continue: publickey,gssaic,password. : Next method to try is publickey. : Next method to try is password. : Trying password authentication. : 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. Executing show running-config : channel 1: new [client-session] : Requesting channel_open for channel 1. : Entering interactive session. : Sending command: ls : Requesting service exec on channel 1. : channel 1: open confirm rwindow 0 rmax 32768
At which point it hangs (I've waited several minutes without any response). The code looks like this:
#!/usr/bin/perl use Net::SSH::W32Perl; $ENV{HOME} = "C:/tmp"; # Configuration Section $username = "USERNAME"; $password = "PASSWORD"; $hostname = "XXXX.COM"; print("Connecting to $hostname\n"); my $ssh = Net::SSH::W32Perl->new($hostname, debug => '1'); $ssh->login($username, $password); my ($out, $err, $exit) = $ssh-> cmd("ls"); print("$out\n"); $ssh->close;
Direct Responses: 8520 | Write a response
Posted on 2008-08-09 17:04:22-07 by cunzhi in response to 7387
Re: Net::SSH:W32Perl Hangs after login

I saw the same issue recently and resolved it.

This is because Net::SSH::W32Perl::protocol_class does not get called and as a result, Net::SSH::W32Perl::_session_channel does not get called either. On Windows, there are some issues when the "select" is applied to non-socket handles ( Check here). I guess one of the Net::SSH::W32Perl's purposes is to overcome the limitation of the "select" on Windows.
Direct Responses: 8555 | Write a response
Posted on 2008-08-15 01:02:05-07 by aels in response to 8520
Re: Net::SSH:W32Perl Hangs after login
Can you please provide more details on how you resolved the problem. Thank you in advance.
Direct Responses: 8956 | Write a response
Posted on 2008-10-05 07:35:51-07 by beakdoosan in response to 8555
Re: Net::SSH:W32Perl Hangs after login
I have the same problem. Does anyone can help to solve this?
Direct Responses: Write a response