The biggest shell-related revelation for me recently was that ~ is a special character in SSH. If you have an SSH session that's hanging and ctrl-C / ctrl-D isn't responding, try typing "~." (without the quotes).
man ssh | grep -A 30 tilde