tmux is a terminal multiplexer, much like screen. Here is how to start it on SSH login (adapted from the script for screen at http://taint.org/wk/RemoteLoginAutoScreen):
Put it somewhere in your .bashrc. This will make all SSH logins default to the same session (remote). If you close the final window in that session, the session will be closed and all the clients connected to that session will exit. You can attach the client to another session by using attach-session.