in reply to Re: Using Net::SSH2::Cisco
in thread Using Net::SSH2::Cisco

I'm running one thread for the purposes of debugging, this will eventually have to be set to ~8-16. The logic all works and based on my reading of the documentation the reason I'm not getting anything in @cmdoutput is because it can't find the '#'. I have been playing with timeouts for a while. Here are my logs:

$ cat /tmp/input.log Trying to connect to tftp server...... TFTP put operation failed:No route to host + Trying to connect to tftp server...... TFTP put operation was successful + Copy complete, now saving to disk (please wait)...
$ cat /tmp/output.log copy startup-config tftp://192.168.0.206/switches/conf/172.16.2.11-con +fg vrf default copy startup-config tftp://192.168.0.206/switches/conf/172.16.2.11-con +fg vrf management

I added a few '\n' as you can see above with the same result. when I run the commands manually on the switch I get the following(it takes about 1-2seconds to run manually):

ewfmb_179_cc7_b# copy startup-config tftp://192.168.0.206/switches/con +f/172.16.2.11-confg vrf management Trying to connect to tftp server...... Connection to Server Established. TFTP put operation was successful + Copy complete, now saving to disk (please wait)... ewfmb_179_cc7_b#

I send the command twice only because some switches use a management vrf and others do not, that is why you see the first output error with 'no route to host'.