Maintain a persistent SSH connection

Q I have to SSH into three Red Hat servers at one desert outpost (I work for an oil company). The TCP/IP connection to the field servers is an unreliable internet over satellite link. Very often I find myself losing connectivity halfway through an operation, and if I leave a session open for more than 15 minutes, the satellite router (to which I have no access) rudely drops my connection. I know that I can run most applications in the background but I am looking for a solution to maintain a persistent connection. Do you know if there is a budget solution that I can implement?

A Yes, there is. The Nohup command runs a command immune to hang ups, with output to a non-TTY, while Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). I am a big Screen fanatic. When invoked as Screen, you can create new windows through a Ctrl+A C with Ctrl+A " (note that is double quotes) to list and select active windows. Ctrl+A D detaches from Screen, to which you can reattach by invoking screen with the -r parameter. If your session drops and you want to reattach to a screen that hasn't been properly detached, invoke as screen -x. Amazing!

Back to the list