Of screen and Solaris
I'd been a regular user of SSH for several months before I discovered screen. For the uninitiated, it allows you to create multiple 'windows', each containing as shell, inside a single SSH session. It also allows you to detatch the whole session from the terminal, log out, then log in and reattach it later, with all programs that were running in it still there. I've now fixed up my SSH logins to automatically reattach my screen, and create it if it isn't there:
ssh -t [email protected] screen -d -R
In PuTTY, the 'remote command' option in the SSH config area (as per the relevant manual section) achieves the same effect.
This 'automatically-reattach-or-create' stuff all worked fine on one Ubuntu, three Debian, and one Solaris machine when I tested it last week, but trying to log in to the Solaris box last night produced
bash: screen: command not found
I think this is because the screen binary lives in /opt/sfw/bin/ on these machines for some reason, hence it's not in the default PATH variable. It is in my user PATH, but I presume that isn't loaded when SSH tries to execute the command. Anyway, specifying /opt/sfw/bin/screen rather than 'screen' in the SSH command solved the problem.