SSH disconnection problem
Your terminal session may get closed due to various network issues while you are
running a process on a remote machine eg.:
# Write failed: Broken pipe
As the result of this network disconnection your ssh shell session will also inadvertently kill any child processes run under your ssh
session on the remote machine.
Running an uninterrupted SSH session solution
Use the screen
command to save the session. While your SSH session gets disconnected the screen command will keep your remote process running. Consider a following SSH example where we attempt to SSH from a local host 10.1.1.2
to remote 10.1.1.15
host.
Screen Command SSH Example
Let’s start by listing our currently opened screen sessions:
local> $ screen -list No Sockets found in /var/run/screen/S-lubos.