I spend a lot of time SSHing to various boxes. This handy little script will set the Terminal to a certain color when I start a session and set it back to white when I'm done. There's nothing worse than being on one box and thinking you're on another. Also, this makes the minimized icons colorful.
First of all, we need to learn how the Terminal refers to colors. You can just use basic words like 'white', 'red', etc., but those colors tend to be pretty intense. It's better to use a light tint of a color, so if you want to get custom,
osascript -e 'tell application "Terminal" to set x to the background color of the front window'
-1, -16950, 4296
#!/bin/bash
osascript -e 'tell app "Terminal" to set background color of first window to {15601, -1, 31913}'
ssh jsmith@example.org
osascript -e 'tell app "Terminal" to set background color of first window to "white"'
Line one is the shebang, of course. Line two sets the Terminal to the color I want. Line 3 actually starts the connection. Once you're logged into the remote box, the script is still running as far as the local machine is concerned. The Terminal will stay that color for as long as you're logged in. Once you log out of the remote box, the local script resumes, sets the Terminal back to white (line 4), and exits. Pretty sweet, eh? Use this and you'll always know at a glance where you are.
arch -i386 osascript -e 'tell app "Terminal" to set background color of first window to {48000, 48000, 48000}'
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad