Perl: the Markov chain saw | |
PerlMonks |
Unable to run command on Cisco switchby 1wax (Novice) |
on Aug 31, 2009 at 12:07 UTC ( [id://792350]=perlquestion: print w/replies, xml ) | Need Help?? |
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.
Back to
Seekers of Perl Wisdom
|
|