Hi,
I am having a problem when i run the following perl code to try and get some info from a cisco switch.
The screen hangs at channel 0: open confirm rwindow 1024 rmax 4096

#############
use Net::SSH::W32Perl ;
use diagnostics;

$ENV{HOME} = "C:/Temp";
$scon = Net::SSH::W32Perl->new ("x.x.x.x", debug => 2);
$scon->login("uname","pword");

my ($output,$errors,$exit) = $scon->cmd("show run | i snmp" . "\n");
print $output;
###############

Debug extract:
< SNIP >
Authentication methods that can continue: password.
Next method to try is password.
Trying password authentication.
channel 0: new client-session
Requesting channel_open for channel 0.
Entering interactive session.
Sending command: show run | i snmp

Requesting service exec on channel 0.
channel 0: open confirm rwindow 1024 rmax 4096
< SNIP >
I have searched for all possible reasons including amending the Net::SSH::Perl::SSH2.pm package to only launch one channel to the switch.
It still hangs at the output and does not respond.

In reply to Unable to run command on Cisco switch by 1wax

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.