If you really want to prevent local disconnection from putty to prevent your ssh connection from being lost, you can install tmux
(or screen
) under cygwin and start putty from there. This allows you to disconnect from putty (by disconnecting from tmux
) and continue to use the existing ssh
connection after reconnecting (to tmux`). This assumes you can start putty from the commandline. If not you should use an ssh-client that can.
That doesn't prevent a dropped ssh
connection from happening, so make sure you set at least TCPKeepAlive
and a reasonable ServerAliveInterval
.
In addition I would run tmux
on the server side so you can reconnect to the commandline program (shell or whatever you are running), after the connection goes down in spite of other precautions (network down etc). Just this latter might be enough for your needs, as it allows reconnection to the session on the server. The local session to putty, and maintaining the ssh connection is (which is not guaranteed anyway), is normally much less interesting.