premal has asked for the wisdom of the Perl Monks concerning the following question:

Hi. I have created a perl script to connect to Linux box using SSH protocol with Net::SSH:W32Perl module. When I run the script it gets hang at "channel 1: open confirm rwindow 0 rmax 32768" error. I also checked nodes related to this error on perl monks but the solutions didn't help. I have given my script below. Can you please help me to find why the script hangs.

use Net::SSH::W32Perl; my $host = 'XXXX.com'; my $user = 'AAAAA'; my $pass = 'BBBBB'; my $cmd = 'ls -l'; my $ssh = Net::SSH::W32Perl->new( $host, debug => 1, protocol => 2 ); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd($cmd); print $stdout, "\n";

OUTPUT of the script

inmuml0033: Reading configuration data C:\Temp/.ssh/config inmuml0033: Reading configuration data /etc/ssh_config inmuml0033: Connecting to linadvs16.ams.com, port 22. inmuml0033: Socket created, turning on blocking... inmuml0033: Remote protocol version 2.0, remote software version OpenS +SH_4.3 inmuml0033: Net::SSH::Perl Version 1.34, protocol version 2.0. inmuml0033: No compat match: OpenSSH_4.3. inmuml0033: Connection established. inmuml0033: Sent key-exchange init (KEXINIT), wait response. inmuml0033: Algorithms, c->s: 3des-cbc hmac-sha1 none inmuml0033: Algorithms, s->c: 3des-cbc hmac-sha1 none inmuml0033: Entering Diffie-Hellman Group 1 key exchange. inmuml0033: Sent DH public key, waiting for reply. inmuml0033: Received host key, type 'ssh-dss'. inmuml0033: Host 'linadvs16.ams.com' is known and matches the host key +. inmuml0033: Computing shared secret key. inmuml0033: Verifying server signature. inmuml0033: Waiting for NEWKEYS message. inmuml0033: Send NEWKEYS. inmuml0033: Enabling encryption/MAC/compression. inmuml0033: Sending request for user-authentication service. inmuml0033: Service accepted: ssh-userauth. inmuml0033: Trying empty user-authentication request. inmuml0033: Authentication methods that can continue: publickey,gssapi +-with-mic,password. inmuml0033: Next method to try is publickey. inmuml0033: Next method to try is password. inmuml0033: Trying password authentication. inmuml0033: Login completed, opening dummy shell channel. inmuml0033: channel 0: new [client-session] inmuml0033: Requesting channel_open for channel 0. inmuml0033: channel 0: open confirm rwindow 0 rmax 32768 inmuml0033: Got channel open confirmation, requesting shell. inmuml0033: Requesting service shell on channel 0. inmuml0033: channel 1: new [client-session] inmuml0033: Requesting channel_open for channel 1. inmuml0033: Entering interactive session. inmuml0033: Sending command: ls inmuml0033: Sending command: ls inmuml0033: Requesting service exec on channel 1. inmuml0033: channel 1: open confirm rwindow 0 rmax 32768

Replies are listed 'Best First'.
Re: Net::SSH::W32Perl hangs at "channel 1: open confirm rwindow 0 rmax 32768" error.
by Anonymous Monk on Mar 22, 2012 at 03:23 UTC
      Hey Thanks a lot. :) Your solution did work and now I will be testing the scrip on my environment. Thanks again.
      How can this be implemented in win64 bit machine, I have both modules net::ssh::perl and net::ssh::w32perl ... since my machine is 64 bit it will make use of net::ssh::perl module and run with those libraries,,, please help me with the fix which need to be patched to make this work for net::ssh::perl as well I am getting the same error Channel 1 : open confirm rwindow 0 rmax 32768 Thanks in Advance

        Have you read the links?

        Have you applied the patches and recompiled the module? How did that fail for you?

Re: Net::SSH::W32Perl hangs at "channel 1: open confirm rwindow 0 rmax 32768" error.
by Redflower (Initiate) on Nov 10, 2014 at 04:48 UTC
    Hi so what is the solution for this issue hanging at channel 1: open confirm rwindow 0 rmax 32768. please help me to fix this isssue.
        I am getting the same problem with Net::SSH:: Perl too ... will the same fix work for that as well ?