SSH connections over DSL being dropped

So, when I leave an SSH connection idle, it seems to get dropped after some period of time. There is a lot of info about how to remedy this problem. The first suggestion is to reduce the TCP keepalive timeout interval. On my system I find this is 7200 seconds (2 hours). One suggestion is to reduce this to a value of 1800 (30 minutes). I am more inclined to try something like 300 (5 minutes). To do this:
/bin/echo "299" > /proc/sys/net/ipv4/tcp_keepalive_time
This belongs someplace like /etc/rc.local. Note that the stinking stupid accursed systemd scheme has screwed with this. Fedora claims that you just create the file /etc/rc.d/rc.local and it will get run on boot. It would be nice if it was that simple, but it isn't (it used to be simple before the systemd disaster). Consider these suggestions:

The second suggestion is to have ssh itself send keepalives, but I have not found it necessary to do this. Another fellow found that the TCP keepalives were not keeping his connections open, and was able to configure his linux ssh by setting the ServerAliveInterval (on the client side) to something like 60 in /etc/ssh/ssh_config (see man ssh_config), or perhaps .ssh/config.


Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]