I have the following script called exec.sh
which runs a python script remotely on node01:
#!/bin/bash
ssh node01 "python2.7 /home/user/run.py"
If I kill exec.sh
using either CTRL+C
or kill -9
, then the python script that I was running through ssh is still executing on node01.
What I want is to kill the process that I was running on node01 whenever I kill the exec.sh
script.