Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I'm trying to set up a Windows computer to always have two SSH tunnels to my Linux server.

Currently, I'm using PuTTY to open the two SSH tunnels: I log in to the server in PuTTY, leave it minimized, and never touch it. This works well, except when the SSH connection drops: PuTTY displays an error message, and I need to manually close the error and reconnect to the server.

What I'd like to do is have an application that can set up the two SSH tunnels, and can automatically reconnect, without needing to manually do anything, including enter a password. The data I'm sending across the two tunnels is VNC connections, so I often won't be at the machine to clear errors and enter passwords. The two tunnels are one local tunnel, and one remote tunnel.

(Yes, I am aware of the hazards of automatically logging in to SSH. I'm planning on making a dedicated user with no privileges and not allowed to interactively log in, and use that.)

I did find this question: How to reliably keep an SSH tunnel open?, but that's using Linux as the SSH client, and I'm using Windows.

share|improve this question
Automatic login is not a hazard if done right. Look up SSH public-key authentication. – grawity Jan 19 '11 at 21:15
I am doing that for the manual logins now, but I believe PuTTY doesn't allow the key to have a blank password. – David Yaw Jan 19 '11 at 21:26
Of course it does. – grawity Jan 19 '11 at 22:57
I must have misunderstood some of the PuTTY documentation. I probably read "we will never make PuTTY auto-type your password for you", and assumed that meant passwords were required on the key as well. – David Yaw Jan 20 '11 at 0:13
up vote 5 down vote accepted

Try Bitvise Tunnelier - it works for me. I set it to establish SSH tunnels while only being visible as a tray icon. It establishes the SSH connection on startup and re-establishes it as soon as connectivity is restored after a cut or after the system went to sleep. I still prefer the looks of the Putty console, so I keep using it - but for keeping tunnels up I now use Tunnelier. The only major downside I have found is the lack of IPv6 support, which Putty provides with no user action needed.

share|improve this answer
I've been using this for a few months now. It's just right: sits in the system tray, turn off any popups complaining about disconnects and such, and it keeps the tunnels open. I still use PuTTY if I'm going to be doing much work over the connection, but for tunnels & quick terminal stuff, Tunnelier works good. – David Yaw Nov 15 '11 at 17:27

Try MyEnTunnel. It can reconnect at connections failures.

enter image description here

share|improve this answer

Have a look at Xshell - it's more scriptable than PuTTY and is free for home use (if that's where you need to use it). It claims to have an auto-reconnect feature but I haven't tried it and have been on a Linux-based laptop for a good few months now so don't have any means to test it at the mo.

share|improve this answer
Xshell is awesome, i have switched to it from SecureCRT 3-4 years ago and haven't looked back – alexeit Feb 7 '12 at 2:23

If your a fan of Putty, try out Putty Tray.

It has a few additional functions, including attempting to auto-reconnect after a connection failure and reconnecting when your computer wakes from standby.

As already mentioned by someone else, I'd combine this with public-key authentication with no pass-phrase.

In theory this should be pretty reliable, but i'm no security expert so can't advise you on that front.

share|improve this answer

I googled it and gota a few results for your question, basically you could always try a search combo of automate putty login which I did. Here is a particularly useful result that should suit you:

It walks you through how to setup a macro for putty. Also download Putty connection manager here (as the link is broken from initial link):

share|improve this answer
The SourceForge link for PuttyCM is broken. See this question. – Craig McQueen Jul 24 '12 at 7:06
@CraigMcQueen, you do realize that this was answered in 01/19/2011!? right? – Jakub Jul 25 '12 at 0:18
Yes, I do realise. And I found it in a Google search yesterday, and other people may do so for a year or two to come. – Craig McQueen Jul 25 '12 at 4:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .