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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.