One of the first things I do every time I set up a server is increase the timeout on the SSH timeout to a much higher value. Nothing more annoying than when you go to refill your drink only to return to a dead session. Increasing the timeout is quite simple:
On the server execute the following commands:
sudo pico /etc/ssh/sshd_config
Look for TCPKeepAlive and make sure it is set to yes and add the following lines after it:
ClientAliveInterval 30 ClientAliveCountMax 1000
This will execute a “keep alive” command every 30 seconds and continue to do so 1000 times. You can tweak these settings to suit your needs of course. You will also need to restart your SSH server using the following command:
# /etc/init.d/sshd restart
For more information on configuring SSH, just type man ssh.