Does
ssh timeout prevention help? What happens when you use
Net::SSH2 to connect to the cisco unit?
I was just looking into something similar yesterday, in trying to figure out how to allow Net::SSH2's channel to start a background process on the target machine, without it dying when the ssh connection is dropped.
See Re^7: A little demo for Net::SSH2.
What I noticed is that the c version of ssh2 has the ability to automatically put itself into the background and run commands as no_tty ( or something like that).
In other words, the c version detachs itself automatically, but a perl connection may need it done manually with
nohup perlprog.pl &
then close the console
I'm just trying to point out the detachment process, as a possible reason for the difference between the c ssh and the Perl version, and that maybe it is the cause of your problem.
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.