listmail wrote:
> I've just started testing Net::SSH2 in hopes to eventually replace 
> Net::SSH[::W32Perl].
> I am having trouble retrieving the stdout data from channel->exec.  I do not 
> require an
> interactive shell, just an ability to execute commands and retrieve the 
> stdout + statuses.
> Is there something I am missing or do I need to do something different 
> altogether?


>         my $chan = $ssh2->channel();
>       $chan->blocking(0);
> 
>         my $returnval = $chan->exec('who') or die "Couldn't exec 'who'\n";

Try several other commands besides who - like 'ls -lF' for eg.
Or try 'who --help' and see if that generates usage text.
Also try dropping the non-blocking.
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to