I need to send the input into a log file the code below does not seem to be working.
my $s = Net::Appliance::Session->new({ personality => 'ios', transport => 'SSH', Input_log => 'input.log', Timeout => 15, host => $ip, });
Thanks I tried
#!/usr/bin/perl use Net::Appliance::Session; my $s = Net::Appliance::Session->new({ personality => 'ios', transport => 'SSH', host => $HOST, privileged_paging => 1, # only if using ASA/PIX OS 7+ # and there are other behaviour options, +see below }); try { $s->connect({ username => 'XXXXX', password => 'XXXXXXX' }); $s->begin_privileged; print $s->cmd('show ver'); $s->end_privileged; } catch { warn "failed to execute command: $_"; } finally { $s->close; };
I got
$ perl getasrrun.pl failed to execute command: read timed-out at /usr/local/share/perl/5.1 +4.2/Net/CLI/Interact/Transport/Wrapper/Net_Telnet.pm line 35 Execution of finally() block CODE(0xa17c388) resulted in an exception, + which *CAN NOT BE PROPAGATED* due to fundamental limitations of Perl +. Your program will continue as if this event never took place. Origi +nal exception text follows: read timed-out at /usr/local/share/perl/5.14.2/Net/CLI/Interact/Transp +ort/Wrapper/Net_Telnet.pm line 35

In reply to net::applance::session Help by viperbmw69

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.