When I run the example code it completes the SCP and the SFTP calls with no problem whatsoever, but when trying to use a channel it fails.  It appears that everything works ok, authentication, etc, but I get zero output using a channel.
<br><br>I turned on debug and and this is the output I get:<br><br>daryl@seclab10:~/CPAN/Net-SSH2-0.09/example&gt; ./read.pl <br>[user daryl]<br>Password: [user daryl]<br>libssh2_channel_open_ex(ss-&gt;session, pv_channel_type, len_channel_type, window_size, packet_size, ((void *)0) , 0 ) -&gt; 0x8362f88
<br>Net::SSH2::poll: timeout = 250, array[1]<br>- [0] = channel<br>- [0] events 1<br>- libssh2_poll returned 0<br>- [0] revents 0<br>Net::SSH2::Channel::DESTROY<br>Net::SSH2::DESTROY object 0x8180488<br>daryl@seclab10:~/CPAN/Net-
SSH2-0.09/example&gt; <br><br>Here is the code as I ran it for the above output:<br><br>#!/usr/bin/perl -w<br><br># Sample Net::SSH2 code illustrating several ways to read the remote<br># /etc/passwd file.<br><br>use Net::SSH2;
<br>use IO::Scalar;<br><br>my $ssh2 = Net::SSH2-&gt;new;<br>$ssh2-&gt;debug(1);<br>die &quot;can&#39;t connect&quot; unless $ssh2-&gt;connect(&#39;localhost&#39;);<br># use an interactive authentication method with default callback
<br># (if a password is provided here, it will forward it without prompting)<br>die &quot;can&#39;t authenticate&quot;<br>&nbsp;unless $ssh2-&gt;auth(username =&gt; scalar getpwuid($&lt;), interact =&gt; 1);<br><br>sub _read {
<br>&nbsp;&nbsp;&nbsp; my $handle = shift;<br>&nbsp;&nbsp;&nbsp; while (my $line = &lt;$handle&gt;) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chomp $line;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $line =~ s/:.*$//;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print &quot;found user &#39;$line&#39;\n&quot;;<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br># (c) type it over a channel
<br>$chan = $ssh2-&gt;channel;<br>$chan-&gt;exec(&#39;cat /etc/passwd&#39;) or die;<br>_read($chan);<br><br><br><br>Thank You<br><br>&nbsp;- Daryl<br>