This question already has an answer here:
I have a remote Linux server and I use it to run some very long tasks using SSH. It works great, but, of course, if the connection dies for some reason, the task dies.
Specifically, I'm running something like this:
[myName@localStation]$ ssh john_doe@myRemoteServer Password: ***** [john_doe@remoteServer]$ ./myVeryLongTask.script > myOutputLog.txt
Is there a way to tweak the SSH connection in such a way that, if the network connection fails, the task keeps running?