Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Comment on

Net::OpenSSH or actually the SSH protocol do not work exactly like that. There is not a remote session where you send commands and get the response back.

Instead there is a binary protocol and on top of it bidirectional IO channels can be created and remote commands or port forwarders attached to them.

In general there is no way to see the IO operations happening because there are handled directly by the master ssh program running on the background. The exception is when you use capturing methods as then, it is Net::OpenSSH who is talking at the other side.

In any case, the module has a debugging mode. For instance, setting...

$Net::OpenSSH::debug = 4|8|64;
... would give you a good idea of what is going on.

Another possibility is to pipe the output of any command through tee so that it appears on the screen and is also saved to a file:

$ssh->system({ stdout_file => ['|-', 'tee'. 'cmd_output.txt ], stderr_to_stdout => 1 }, @cmd);

In reply to Re: Is it possible to see what Net::OpenSSH is doing? by salva
in thread Is it possible to see what Net::OpenSSH is doing? by walkingthecow

and:  <code> code here </code>

  • Please read these before you post! —
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (4)
    As of 2014-07-13 22:15 GMT
    Find Nodes?
      Voting Booth?

      When choosing user names for websites, I prefer to use:

      Results (252 votes), past polls