cnoyes72 has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to use the Net::SSH2::Cisco module against Cisco Nexus switches and keep getting a timeout when executing the command. The logs show the command executed (I recieved the expected response from the switch), but the script timesout. This same script runs perfectly against and IOS switch. I think it may be waiting for the prompt but doesn't recognize it. Has anyone had luck getting this to work with Nexus gear?
#!/usr/local/bin/perl # # use strict; use warnings; use Net::SSH2::Cisco; my $t = Net::SSH2::Cisco->new( host => 'nexus-switch', Dump_log => '/root/dump.log', Output_log => '/root/output.log', Input_log => '/root/input.log', Waitfor_clear => '0' ); $t->login( Name => 'name', Password => 'passwd' ); # Execute Command my @output = $t->cmd(string => "show clock"); print @output; $t->close;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Net::SSH2::Cisco and Nexus switches
by VinsWorldcom (Prior) on Aug 14, 2018 at 20:47 UTC | |
by cnoyes72 (Initiate) on Aug 15, 2018 at 20:16 UTC | |
by VinsWorldcom (Prior) on Aug 15, 2018 at 22:49 UTC | |
by cnoyes72 (Initiate) on Aug 16, 2018 at 14:29 UTC | |
by VinsWorldcom (Prior) on Aug 16, 2018 at 14:54 UTC | |
Re: Net::SSH2::Cisco and Nexus switches
by zentara (Cardinal) on Aug 14, 2018 at 19:31 UTC | |
Re: Net::SSH2::Cisco and Nexus switches
by Larry-W (Initiate) on Oct 18, 2018 at 11:02 UTC | |
by actarus2003 (Novice) on May 07, 2021 at 14:16 UTC |