How can I create persistent SSH connection to "stream" commands over a period of time?

Posted by Darth on Server Fault See other posts from Server Fault or by Darth
Published on 2010-12-25T22:55:44Z Indexed on 2010/12/25 23:55 UTC
Read the original article Hit count: 350

Filed under:
|

Say that I have an application running on one PC that is sending commands via SSH to another PC on the network (both machines running Linux).

For example every time something happens on #1, I want to run a task on #2. In this setup, I have to create SSH connection on every single command.

Is there any simple way to do this with basic unix tools without programming custom client/server application? Basically all I want is to establish a connection over SSH and then send one command after another.

© Server Fault or respective owner

Related posts about linux

Related posts about ssh