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.

link|improve this question

feedback

6 Answers

up vote 3 down vote accepted

Tunnelier provides the functionality I was seeking.

link|improve this answer
feedback

There's also a fork of PuTTY called PuTTY Tray which adds a "reconnect on connection failure" option (albeit experimental): http://haanstra.eu/putty/

link|improve this answer
Looks like it would also solve my problem. Thanks – colithium Sep 20 '11 at 21:55
feedback

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).

link|improve this answer
feedback

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

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

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.

link|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
feedback

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 :)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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