So, this does appear to work now, however, I've run into another related problem. Although the call does time out, when it does it segfaults and corrupts my bash shell.
Using the following code:
eval {
logit ("Attempting to send os password to ssh object for $cust | $
+alias") if ($debug==1);
if ( timeout_call( $alarm_timer, sub { $ssh2->auth_password($os_us
+er,$os_pass); } )) {
logit ("log in failed\n");
$popout = 8;
return 8;
}
};
return $popout if ($popout > 0);
The second return is to "pop" me out of my subroutine. Here is what happens:
Tue Jan 16 15:01:16 2007: Attempting to send os password to ssh object
<
2rootssh-connectiopasswordsiszSegmentation fault
[support@hydra script]$
Although it doesn't look like it does above... it's full of odd ASCII characters.
Any ideas?
I'm using 0.12 of libssh2, my best guess is that this is a libssh2 bug, which I don't think is fixed in the latest release (0.14) - although getting that to compile on RHEL4 is another thread on another board. :-(
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.