Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Is it possible to see what Net::OpenSSH is doing?

by walkingthecow (Friar)
on Jun 12, 2013 at 11:21 UTC ( #1038432=note: print w/ replies, xml ) Need Help??


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

Hm, I was thinking with the ability to make an interactive shell with Expect, and then the ability to type/send commands and get/receive that command's output, maybe I could get that interactive shell and somehow have Net::OpenSSH type/send commands to the shell rather than me. I even tried setting master_stdout(stderr)_fh's to the pty device, but obviously that didn't work. I thought I was on to something a bit ago, but kept ending with the error 'Error: could not connect pty as controlling terminal'. Darn.


Comment on Re^2: Is it possible to see what Net::OpenSSH is doing?
Re^3: Is it possible to see what Net::OpenSSH is doing?
by salva (Monsignor) on Jun 12, 2013 at 11:34 UTC
    Net::OpenSSH does not send commands to a shell.

    A possible way, quite difficult, may be to abuse the OSTracer interface that allows to run the master ssh process with strace (or your favourite OS equivalent).

    You will have to write your own tracer able to dump the IO interactions of the ssh master process to the console.

      I just realized you wrote this module. Thank you. I've been using Expect for years. I just started using Net::OpenSSH recently, and it has really made my life a lot easier. I'm looking at strace output as well as OSTracer to see what I can come up with. I will post back here with any results (i.e., don't expect me to post back here).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1038432]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-07-28 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (187 votes), past polls