Loading ...
Sorry, an error occurred while loading the content.

Disconnect from Remote Server

Expand Messages
  • Roger
    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
    Message 1 of 1 , Sep 28 5:57 AM
    • 0 Attachment
      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.

      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






      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.