I have a small local network that piggybacks on a captive WiFi, and I use
ssh on OS X with
-oServerAliveInterval=240 and PuTTY 0.62 on Windows 7 Professional for establishing connections to my Linode, Hetzner and other servers.
With PuTTY, I select
Sending of null packets to keep session active to 240. The
Enable TCP keepalives (SO_KEEPALIVE option) is off, as per defaults.
When my internet is temporarily down for about a minute (have to re-authenticate on the captive portal), PuTTY almost always loses all open ssh sessions that I have, and especially those where there was any kind of activity, but OpenSSH on OS X never loses any sessions as long as my internet is back up within about a minute or two, even if I actually try to type something in ssh, and see no reply for the whole 60 seconds or so, until my connection is active again. (So I know for sure that NAT states are always preserved.)
Can I stop Windows / PuTTY from preemptively discarding good connections?
It seems to me as if SO_KEEPALIVE or some such is actually on by default in Windows, and the timeout for detecting stale connections is way too small. I would like to increase it to something more than a couple of seconds, similarly to how OS X is immune to these brief temporary outages as long as the outage is only a couple of hundred seconds and is below the value of