'ssh' command behavior

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

 I'm about to switch an application from using rsh to (Open) ssh and
bumped into a problem. My (web) application runs on Solaris and its
task is to run, control, and stop processes running on other Solaris

 If someone clicked on 'start' button, it started a local process,
which in turn started a process via rsh on the remote Solaris server.
It was like:

 rsh l username servername '/tmp/startscript.sh'

These two processes ran until one of them died, i.e. any of these
process died, the other one died too. This way I could control exactly
whether a remote process still runs, and I also was able to stop this
exact process. In fact, rsh made the whole control of the remote
process transparent, I got the stdin, stdout, stderr of the process
locally, and even the signals sent to the local process were forwarder
exactly to the remote process.

Now, I thought I can just simply replace the rsh with ssh, I supposed
this mechanism works the same way. However, if I kill the local
process, the remote one doesn't end.

Could you please tell me, how this mechanism works on ssh?



Re: 'ssh' command behavior

Try using ssh -t; that should ensure that the signal is sent across the
connection.  Hopefull the presence of the tty on the remote won't cause
other problems.

  Richard Silverman

Re: 'ssh' command behavior

Quoted text here. Click to load it

Thanks Richard, that helped a lot! Now the only problem to solve that
when I exec ssh as daemon process (I have to disassociate from the PHP
script), the signal handling does not work properly, however your
suggestion is still a big step for me (and a small one for the mankind



Site Timeline