$Bill :)

Are you using the http://theoryx5.uwinnipeg.ca/ppms/  repo, Net::SSH2 
0.09 version?  I'm guessing the libssh2 dependency is satisfied in 
perhaps the SSH2.dll?  At least I hope things get installed correctly 
via ppm.  Anyway, I've tried several valid commands such as '/bin/df 
-k', 'ls', and your suggestions with no success on retrieving output.  
I've also tried the suggestions at 
http://www.perlmonks.org/?node_id=621761 which lean towards using 
shell() with no luck.


Bill Luebkert wrote:
> 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
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to