How does one ensure when I spawn a process on a remote machine using Python Paramiko, that the process will die when the connection does?
Specifically, the issue I'm having is I'll run wget or some other command using Paramiko, and it will hang. Unfortunately, when I kill the python script process directly, The process on the remote machine does not die. It just keeps running and I have another hanging process.
I have to kill the process directly because I'm trying to link it with a tool which can only kill processes directly.
I've heard that this can be done in SSH by making SSH a "Control Terminal". Is there anything in Paramiko that can do this, or just kill any processes on a remote machine after it spawned?
Thanks!