Programmatically Start Long-Running Command via SSH in Background and Disconnect (and get the PID)
UPDATE: Turns out, I googled the wrong thing/keywords. There is a helpful answer on StackOverflow. It was surprisingly difficult to programmatically start a long-running command via SSH in background and disconnect the SSH session immediately. So, in case you need help, here’s how I did it. The final solution is ridiculously simple. Goal My goal is to programmatically (i.e., from a script) start a command on a remote server. So far so good,...
Read more