Get into the habit of colour-coding your important SSH sessions, red/green/blue can give you a very powerful subconscious check before doing something very silly.
I use iTerm2 and have different profiles for different directories/remote hosts. iTerm switches the background colour automatically for me. I'm sure other terminal emulators would have similar features.