Configure SSH to keep from timing out

Quick way to keep ssh alive.

Configure SSH to keep from timing out
Page content

SSH Keep Alive

Secure Shell is a means to connect terminals to servers. When it detects you are idle it disconnects you. This is for security. This however is very annoying and can cause issues if you are installing something and need to keep the terminal active. Some people try to leave ’top’ running or ‘screen’ to keep the terminal busy. There is a simple configuration that can just as easily do this.

bash

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

This single setting will tell ssh (client) to send a keep alive packet through SSH every 60 seconds to keep your session from timing out. The default setting is 0 (meaning never).