Do you know where it's hanging ? (You could insert some
print "Got to here\n"; lines to determine where it's hanging.) If it's hanging after
$chan2->shell(); try inserting
$chan2->blocking(0);.
I ran your script on a linux box (localhost) and here's the output:
Username/Password is correct
libssh2_channel_open_ex(ss->session, pv_channel_type, len_channel_type
+, window_size, packet_size, ((void *)0) , 0 ) -> 0x82cf7c0
Net::SSH2::poll: timeout = 250, array[1]
- [0] = channel
- [0] events 1
- libssh2_poll returned 1
- [0] revents 1
Net::SSH2::Channel::read(size = 1, ext = 0)
- read 1 bytes
- read 1 total
LINE :
Net::SSH2::poll: timeout = 250, array[1]
- [0] = channel
- [0] events 1
- libssh2_poll returned 0
- [0] revents 0
Net::SSH2::Channel::DESTROY
Net::SSH2::DESTROY object 0x8131de0
It didn't hang for me ... but then I suspect that's not the output you were looking for.
Update:With debugging turned off the output reduces to:
Username/Password is correct
LINE :
(On the same machine, 'hostname -a' returns nothing ... so the output looks about right to me.)
It would be a good idea to run the Net::SSH2 test suite against the server. (If you've already done that, did all tests pass ?)
Cheers,
Rob
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.