Follow-on from my post above (Re: Using Net::SSH2::Cisco), I tested something simple against a 7200-series router:
#!perl use strict; use warnings; use Net::SSH2::Cisco; my $host = Net::SSH2::Cisco->new( host => '10.254.254.1', dump_log => 'out.txt', ); $host->login( name => 'cisco', password => 'cisco', ); my @ret = $host->cmd( "copy running-config tftp://192.168.100.254\n\n\n" ); print @ret; $host->close;
... and it works fine (note my TFTPd server is 'tftpd-simple.pl' supplied with the Net::TFTPd module)...
VinsWorldcom@C:\Users\VinsWorldcom\tmp> test.pl copy running-config tftp://192.168.100.254 Address or name of remote host [192.168.100.254]? Destination filename [r1-confg]? !! 9721 bytes copied in 4.400 secs (2209 bytes/sec)
I think you need to boil your script down to basics, get something that works, then starting adding the threads and other special stuff. Notice I didn't use waitfor() or change timeout() - I'm just using defaults. Note also that I tested and it works just as well when using Net::Telnet::Cisco (instead of Net::SSH2::Cisco - s/SSH2/Telnet/g) - as it should since Net::SSH2::Cisco is supposed to be a drop and replace SSH solution for the Net::Telnet::Cisco one.
In reply to Re: Using Net::SSH2::Cisco
by VinsWorldcom
in thread Using Net::SSH2::Cisco
by mroe1234
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |