Sending Signal to remote process

Thomas Güttler guettliml at thomas-guettler.de
Tue Jan 23 22:13:17 AEDT 2018


I want ssh to forward the SIGTERM signal to the remote command.


Example:
    ssh root at localhost /root/print-signal.py


Get PID of ssh:
     ps aux| grep print-signal


Kill the matching ssh process:
     kill pid-of-ssh


Unfortunately only the ssh process itself gets the signal, not the remote command (print-signal.py). The remote command 
does not terminate :-(

How can I make ssh "forward" the SIGTERM signal to the remote command?

See https://stackoverflow.com/questions/48377993/forwards-sigterm-over-ssh

According to this[1] answer, openssh does not implement this.

It would be realy great if openssh could forward the signal to the remote-command.

What do you think?

Regards,
   Thomas Güttler


[1] https://stackoverflow.com/questions/46333657/send-signals-to-remote-process-with-python/47581495#47581495



-- 
Thomas Guettler http://www.thomas-guettler.de/
I am looking for feedback: https://github.com/guettli/programming-guidelines



More information about the openssh-unix-dev mailing list