Put these lines in your client-side file ~/.ssh/config ServerAliveInterval 300 ServerAliveCountMax 60 I think there is a server-side version as well, but if you connect to as many servers as I do, it can be easier to just do it client-side. -s