Odd problem: when I'm working with putty from my home office to a server I have on the public internet, after a short period of time the terminal interface on the client quits responding. Here is some parameterization:
1. I've tried all sorts of keep-alive options on the client and the server. This just started happening within the last week; prior to that, I had tcp keep-alives in the server "on" and set to 900 seconds in the putty client. Since then, I've tried all sorts of various options and no change.
2. This does not happen when logging in to the same server from work. The session will remain stable for days regardless of whether I type into it or not.
3. I set debugging to DEBUG3 on the server and wrote a simple bash script that will print the time to the putty screen, wait 2 seconds, then print the time again, so I could narrow down exactly when it occurred and follow what was happening in the logs. The client log has nothing except the time being received. The server has very verbose output, but nothing I can see that looks unusual. For a window that printed the last "date" output at 13:50:03, here is the server output log that brackets that time (note the gap; evidently sshd saw nothing happen):
Jun 21 13:48:46 ops sshd: debug2: fd 3 setting O_NONBLOCK
Jun 21 13:48:46 ops sshd: debug1: Bind to port 22 on 0.0.0.0.
Jun 21 13:48:46 ops sshd: Server listening on 0.0.0.0 port 22.
Jun 21 13:48:46 ops sshd: debug2: fd 4 setting O_NONBLOCK
Jun 21 13:48:46 ops sshd: debug1: Bind to port 22 on ::.
Jun 21 13:50:30 ops sshd: debug3: fd 4 is not O_NONBLOCK
Jun 21 13:50:30 ops sshd: debug1: rexec start in 4 out 4 newsock 4 pipe 6 sock 7
Jun 21 13:50:30 ops sshd: debug1: Forked child 6746.
Jun 21 13:50:30 ops sshd: debug3: send_rexec_state: entering fd = 7 config len 685
Jun 21 13:50:30 ops sshd: debug3: ssh_msg_send: type 0
Jun 21 13:50:30 ops sshd: debug3: send_rexec_state: done
Jun 21 13:50:30 ops sshd: debug1: inetd sockets after dupping: 3, 3
putty doesn't seem to know the connection has dropped. If I let it go for hours, putty will eventually come back and say the connection has timed out, but this is way after it has quit responding.