Forwarding SIGTERM over ssh

自作多情 提交于 2019-12-05 01:33:25

I think you can do the following :

ssh root@localhost /root/print-signal.py

**Get PID of python file running **

ps aux| grep print-signal

Kill the matching ssh process:

ssh root@localhost "kill <pid>"

Here you are sending command to remote host .

Hope this solves your problem .

Send via SSH this (tested on sleep process):

$(proc=$(pidof sleep) && kill $proc)
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!