I'm logging into an IOS device with
Net::Appliance::Session and then I'm executing a command that takes longer than 30 seconds to execute (an upgrade). I notice that I consistently get the following error:
Timeout, EOF or other failure waiting for command response at ./net_appliance_session.pl
#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
use Net::Appliance::Session;
my $ios_device_ip = '10.1.1.1';
my $ios_username = 'user';
my $ios_password = 'pass';
my $ios_enable_password = 'enable_pass';
$|=1;
my $session_obj = Net::Appliance::Session->new(
Host => $ios_device_ip,
Transport => 'Telnet',
Dump_log => 'dump.log',
Input_log => 'input.log',
Output_log => 'output.log'
);
# give verbose output whilst we run this script
$session_obj->input_log(*STDOUT);
$session_obj->connect(Name => $ios_username, Password => $ios_password
+, Timeout => 1000);
$session_obj->do_paging(0);
$session_obj->begin_privileged($ios_enable_password);
$session_obj->cmd('upgrade all ftp://anonymous@host/buildname');
So my question is, how can I change the command (not login) timeout setting? I know that Net::Telnet and openssh are used by Net::Appliance::Session but I'm not sure how to access the configuration options underneath.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.