Topic: Howto: Prevent SSH connection from freezing

Recently I was finding that my SSH connection to my FreeBSD server was freezing. I'm on Mac OSX 10.8 ML connecting to a FreeBSD box using standard Terminal app. I'm using shared keys and the connection was fine and working well until I left the Terminal window idle for over 15 seconds. To prevent your connection from freezing simply create local SSH config file:

# cd ~/.ssh
# touch config

And add ServerAliveInterval option to it:

# echo "ServerAliveInterval 60" >> ~/.ssh/config