rfbits has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I'm using Net::SSH::Perl to connect to the remote server. After executing the below code (to get real-time output), I want the control to be returned to the client. This is required, because I want to process the output captured from the logs.
I looked at the perldocs of the module, but I did not find any subroutine that supports this feature.
#!/usr/bin/perl - w use Net::SSH::Perl; use strict; ............. ............. ............. ............. $sshRemote->register_handler("stdout", sub { my($channel, $buffer) = @_; $str = $buffer->get_str; } ($stdout, $stderr, $err) = $appRemote->cmd("tail -f /var/log/messages" +);
Thanks, Roger
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Disconnect from Remote Server
by tirwhan (Abbot) on Sep 28, 2010 at 19:18 UTC | |
by rfbits (Initiate) on Sep 28, 2010 at 19:41 UTC | |
Re: Disconnect from Remote Server
by salva (Canon) on Sep 29, 2010 at 06:23 UTC | |
by rfbits (Initiate) on Sep 30, 2010 at 14:44 UTC | |
by rfbits (Initiate) on Oct 05, 2010 at 01:55 UTC | |
by salva (Canon) on Oct 06, 2010 at 10:44 UTC | |
by rfbits (Initiate) on Oct 07, 2010 at 04:01 UTC |