I'm trying to:
- Launch several
ssh
sessions (processes) through a script (Python) - Communicate with the sessions by sending them commands via STDIN (even though they aren't open in my current terminal)
I've got the session spawning part down. I'm just unable to grab the process and send it stuff. I should mention this is a realm I've only recently started delving in so I'm definitely missing theory.
Explanation:
In-depth what I'm trying to do is launch ssh
WITHOUT a terminal (I'm already doing this with python, so that isn't the issue) in the background. My problem arises when I actually want to communicate with the background process. How can I send data to a background process' STDIN?
ssh
processes commands, do you mean arguments like i.e.-vvv
? I guess you'll need to have each process listen to some specific socket (possiblystdin
) to which you can direct all your messages. – Feb 18 '12 at 22:14ssh
session (logging into another server). Then sending commands tossh
through STDIN to the remote server. – nopcorn Feb 18 '12 at 22:50ssh host command-list
. – jw013 Feb 18 '12 at 23:01