http://www.perlmonks.org?node_id=483171


in reply to A "better" Putty keep-alive

Try setting putty's "Seconds between keepalives" option to something greater than zero, 300 is probably a good number. Since I set this option I've had no problem keeping my connections alive for long periods of time. I've never had any luck with TCP keepalives, so I don't bother with them.

Replies are listed 'Best First'.
Re^2: A "better" Putty keep-alive
by diotalevi (Canon) on Aug 12, 2005 at 03:05 UTC
    This is exactly the setting that isn't doing me any good. I need something more substantial than the plain keep-alive. I need something the server thinks is a real key press.
Re^2: A "better" Putty keep-alive
by RMGir (Prior) on Aug 12, 2005 at 12:19 UTC
    I'll confirm what diotalevi said; that option doesn't do any good for me, either.

    Some nice ideas in this thread!


    Mike
      On some *nix OS I have found security policies that forcibly disconnect terminal sessions believed to be idle. In which case keep-alives don't offer any help. One way to fool the policy is to leave the terminal with a blank "read" request.

      prompt$ jobs
      <stuff running in background (or not, just camping)>
      prompt$ read
      <terminal (and policy) thinks we are waiting for user input and dare not end our session>

      When you return just hit enter, and you get your prompt back.

      This is also a great way to keep "screen" sessions from being killed based on policy idle timeouts.

      Of course your situation may be very different. Hope this helps, If not don't blame a guy for trying to help.