Linux Command Line Utility: “Screen”
I was having problems today when trying to build a package on my home Linux box, and the Putty ssh client was timing out on me, despite a KEEP_ALIVE setting of 60 seconds.
Thanks to Splatypus in #gentoo on irc.freenode.net, who told me to use “screen”. of course I had no idea what they meant, so they gave me the link to the project page on Freshmeat.net. From there I found the official gnu screen page, and then a quick search turned up a nice screen tutorial and developers project page.
The screen tutorial was a little intimidating at first, but after playing with it, I finally got it. The notation behind “screen” is that you can login via ssh to your server (start ‘screen’), then create “windows” inside the shell, and then detach them from the current ssh session. Logout, and then reconnect anytime from anywhere later, and run ‘screen -r’ to reattach all the windows to the current shell.
This is great, because I kicked off a build from a regular old ssh shell in Putty, and the darn thing timed out 2.5 hours into it. Now I can just detach the window, and reconnect at anytime later, preserving the output, state, etc.
You can also name your windows, and list them so you can see what all you got going on.
An excellent tool, and a must have for remote admins.