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.