I have 300 + cisco 4948 IOS switches that require new code tftp'd to them. I have been trying to use net::appliance::session for this. I am able to login to the device and send 'copy tftp bootflash:" and get the next prompt. But it never fills in 10.148.48.52. I read several posts regarding custom cmd using String and Match but I can't figure it out. Here is what I'm using:
my $session_obj = Net::Appliance::Session->new( Host => "swi-87", Platform => 'IOS' Transport => 'SSH', ); $session_obj->connect( Name => $userinfo[0], Password => $userinfo[1], SHKC => 0 ); $session_obj->input_log(*STDOUT); $session_obj->begin_privileged($userinfo[1]); $session_obj->cmd("copy tftp bootflash:"); $session_obj->cmd('10.148.48.52'); $session_obj->cmd("cat4500-ipbasek9-mz.122-31.SGA9.bin"); $session_obj->close;
Can anyone provide an example? Here are the prompts the switch provides:
swi-87#copy tftp bootflash: Address or name of remote host []? 10.10.10.10 Source filename []? cat4500-ipbasek9-mz.122-31.SGA9.bin Destination filename [cat4500-ipbasek9-mz.122-31.SGA9.bin]?
I am able to capture the running config, set config-register.....using the module. I just can't get past the above prompts. I appreciate any assistance. Thanks
In reply to net:appliance::session copy tftp bootflash: by boatperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |