/bin/echo "299" > /proc/sys/net/ipv4/tcp_keepalive_timeThis 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.
Tom's Computer Info / [email protected]