Prevent SSH timeouts: disable keepalive

By Andy

I never had the problem at home but on many other networks an idle connection would drop after a couple of minutes. I added this to ~/.ssh/config several hours ago and haven’t lost a connection since:

TCPKeepAlive no
ServerAliveInterval 20
ServerAliveCountMax 10

It’s counter-intuitive but it works for me. The usual disclaimers apply.

Tags: ,

2 Responses to “Prevent SSH timeouts: disable keepalive”

  1. Para prevenir timeouts en conexiones SSH « Javier Aroche @ Wordpress Says:

    [...] prevenir timeouts en conexiones SSH Esto lo tengo que probar: como prevenir timeouts en conexiones SSH. Resulta muy molesto cuando te pasa… Esta entrada fue escrita por Javier Aroche, publicada [...]

  2. Links for Tue 20 May 2008 - Joseph Scott’s Blog Says:

    [...] Prevent SSH timeouts: disable keepalive < Andy Skelton – No promise that this work, just one more thing to try if you are having problems keeping ssh connections up. Tags: ssh « Twitter Updates for 2008-05-18 [...]

Leave a Reply