1wax has asked for the wisdom of the Perl Monks concerning the following question:
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.
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Unable to run command on Cisco switch
by salva (Canon) on Aug 31, 2009 at 12:53 UTC | |
by 1wax (Novice) on Sep 01, 2009 at 07:09 UTC | |
by salva (Canon) on Sep 01, 2009 at 10:28 UTC | |
by 1wax (Novice) on Oct 08, 2009 at 13:06 UTC | |
Re: Unable to run command on Cisco switch
by raisputin (Scribe) on Aug 31, 2009 at 18:43 UTC |
Back to
Seekers of Perl Wisdom