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

In reply to Net::SSH::W32Perl hangs at "channel 1: open confirm rwindow 0 rmax 32768" error. by premal

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.