May 5, 2013

Stopping a remote process after killing an ssh session

I often want to tail log files on remote server(s) when running diagnostics for an application. You can either login to the remote server via an SSH session, then execute the tail command. Or you can do it from a local shell (without explicitly logging onto the remote server first). That’s pretty simple: ssh myRemoteServer tail -f /path/to/logs/myapp.log The problem here, is when you ctrl-c out of this command to kill the tail, the process is still running on the remote machine. ... Read more

© Michael Sharman 2017