Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After a small hiccup in internet connection, any open PuTTY windows throw up a message box saying there was a connection error. Is there a way to automate retry attempts? Or better yet, tell it to watch the status of the network and reconnect when internet access is reestablished?

I know there's the "stackoverflow" solution of writing a program that invokes PuTTY using its command line interface using -load and -pw. But I'm looking for a "superuser" solution because that seems like less work.

Should I look into Tunnelier instead?

Background: I'm using an SSH tunnel with port forwarding to get remote access to a database on BlueHost.

share|improve this question

There's also a fork of PuTTY called PuTTY Tray which adds a "reconnect on connection failure" option (albeit experimental):

share|improve this answer
Looks like it would also solve my problem. Thanks – colithium Sep 20 '11 at 21:55
up vote 7 down vote accepted

Tunnelier provides the functionality I was seeking.

share|improve this answer

Kitty is a forked version of putty that adds reconnect, send to tray and stored username/password. The auto reconnect works after the machine awakes from sleep as well. It's been very stable for me. FREE :)

share|improve this answer
Awesome, I just tried it and it does exactly what I want – Martin Hansen Mar 6 '15 at 9:12
Download: – Userpassword Nov 21 '15 at 21:48
The auto reconnect options are on the middle of the "Connection" page under "Reconnect options". I wasn't sure at first if this feature was automatic or a setting – SeanDowney Dec 16 '15 at 18:46

Might not be as useful or convenient for you as it is for me, but I use screen in my ssh sessions and it has the option of resuming and a broken connection with screen -R so long as you connect to the same server (my uni provide 3 servers which they can allocate or you can explicitly choose).

share|improve this answer

You can use mutli tabbing putty which allows to reconnect the session back. Beside bringing the session back it allows multi tabbing.

share|improve this answer

The only thing I can think of that might help is the "Enable TCP Keepalives" option under Connection.

share|improve this answer
See my comment on jfmessier's answer – colithium Sep 15 '10 at 18:23

You might not be able to re-establish an EXISTING connection, as the shared key created during the connection, and renewed on a regular basis might get our of sync, or outdated. At this point, this would have to be re-initialised, using your own private key with the server.

Enable TCP Keepalives might be the only solution here.

share|improve this answer
My situation is: I use the connection rather frequently and it should never be idle for more than a minute. My issue is when the internet disconnects for a few seconds, so does my session. ServerAliveInterval and ServerAliveCountMax seem like they MIGHT work but I'm not sure how to configure those with PuTTY... – colithium Sep 15 '10 at 18:23
Under PuTTY configuration, in the list on the left, click Connection. On the right, you will see items such as "Seconds between keepalives (0 to turn off)" 0 is the default value. You can also play with the Low-level TCP connection options. – jfmessier Sep 16 '10 at 11:34
Key re-exchange requires acknowledgement from the other end... "out of sync" can't happen. – grawity Oct 20 '10 at 10:04

You can use screen on the server side, and setup a passwordless auth to putty with a low timeout.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.