Guide

SSH tunnel manager

An SSH tunnel manager is a program that saves your SSH port forwards, starts and stops them without a terminal, restarts them when the connection drops, and shows whether each one is working. This page explains when you need one, what to check before choosing one, and how Transputty for Windows 11 approaches it.

Short answer

An SSH tunnel manager keeps SSH port forwards as saved, named items instead of commands. It connects them without a terminal window, reconnects them after a network drop or sleep, and reports the state of each forward. You need one when tunnels must stay up all day; for a single short-lived forward, ssh -L in a terminal is enough.

About Transputty. Transputty is an SSH tunnel manager for Windows 11 made by Hankinsoft Development Inc. It is in development and has no public build yet; see release status. The first half of this page applies to any tool.

What is an SSH tunnel manager?

SSH can carry other TCP connections inside its encrypted session. This is SSH port forwarding, often called tunneling, and it comes in three kinds:

Kind ssh option What it does
Local -L A port on your computer leads to a host and port the SSH server can reach
Remote -R A port on the SSH server leads back to a host and port your computer can reach
Dynamic -D A SOCKS proxy on your computer sends each connection through the SSH server

A tunnel is only a property of a running SSH session. When the session ends, the forward ends with it. A tunnel manager is the layer on top: it stores the definitions, owns the sessions, restarts them, and tells you what state they are in.

What does plain ssh do, and where does it stop?

OpenSSH is on Linux and macOS, and Windows 10 and 11 include the OpenSSH client as well. One command opens a tunnel to a database behind a bastion:

ssh -N -L 5433:db.internal:5432 deploy@bastion.example.com

-N asks for no remote command, so the session only forwards. Port 5433 on your computer now reaches db.internal:5432 as seen from the bastion. (The local port is 5433 because a PostgreSQL server on your own computer would already hold 5432.) For a one-off task this is all you need, and no extra software will do it better.

The limits show up when tunnels have to live for hours or days:

  • The session is tied to a terminal. Close the window, or let the laptop sleep, and the tunnel is gone. -f puts ssh in the background, where it is easy to forget and harder to stop.
  • Nothing restarts it. ssh exits when the connection breaks. Until you run it again, the local port is closed and your application gets "connection refused".
  • A dead link can go unnoticed. Without ServerAliveInterval, a connection cut by a NAT timeout can look alive until you use it.
  • A failed forward is easy to miss. If the local port is already taken, ssh prints a warning and carries on without that forward, unless you set ExitOnForwardFailure=yes, in which case the whole session exits.
  • Passwords and one-time codes need a person. ssh has no option to store a password, so unattended restarts need keys.

A Host block in ~/.ssh/config with LocalForward, ServerAliveInterval and ExitOnForwardFailure removes the typing and fixes the third and fourth points. It does not restart anything.

What about PuTTY sessions, scripts and autossh?

PuTTY stores forwards in a saved session (Connection, SSH, Tunnels) and supports local, remote and dynamic forwarding. Each session is a terminal window, and PuTTY does not reconnect by itself: the project's wishlist entry for automatic reconnection is still open. plink can run the same session from a script.

A script with a loop restarts ssh or plink when it exits. It works, and many teams run one. The usual weak points are that it retries a rejected login as eagerly as a network error, which can lock an account, and that nobody sees its state.

autossh is that loop done properly: it starts ssh, watches it, and restarts it when it dies or stops passing traffic. It is a good answer on Linux and macOS for key-based tunnels, usually under systemd or launchd. It has no native Windows build, unattended restarts need key-based logins, and it is still invisible unless you build monitoring around it.

All three stay honest choices. A tunnel manager is worth adding when the cost of a tunnel being down, or of someone not knowing that it is down, is higher than the cost of another program.

What should you look for in an SSH tunnel manager?

This checklist is neutral: use it to compare any tools, including Transputty.

Question Why it matters
How does it reconnect? Look for backoff between attempts, a keepalive to detect dead links, and recovery after sleep and network changes. Ask what it does after a wrong password: retrying a rejected login can lock the account.
What happens to the listener during a reconnect? If the local port closes, clients see "connection refused" and some give up. If it stays open, a short outage looks like a slow request, but a plain TCP port check then passes while the tunnel is down, so health checks have to make a real request.
How are host keys handled? Unknown hosts should show a fingerprint to confirm. A changed key should stop the connection, not offer a quick accept. Check whether checking can be switched off, whether an imported StrictHostKeyChecking setting is carried over, and whether you would want that.
Where are credentials stored? Passwords and passphrases belong in the operating system's credential store, not in a settings file. Check whether private keys are copied into the app or read in place.
Does it support jump hosts? If your servers sit behind a bastion, you need ProxyJump-style chains, ideally with a separate login for each hop.
Does it wrap the system ssh, or include its own SSH code? A wrapper inherits OpenSSH's behavior and your ssh_config, but depends on what is installed and has to parse its output. A built-in implementation controls reconnection and errors precisely, but supports only the options its authors implemented.
What can you see per tunnel? State for each forward, not just each connection; the reason for a failure; traffic; a log you can read after the fact.
Does it start at login and run without a window? A tray or menu-bar mode and a start-at-login option. A few tools run as a service before anyone signs in, which matters on servers.
Which logins does it support? Password, key files, an SSH agent, keyboard-interactive codes. If you depend on certificates, hardware keys or Kerberos, check for them by name.
License, price and platforms Free, one-time or subscription; whether an account is required; which operating systems it runs on.

How does Transputty approach each point?

This section describes Transputty 0.1 for Windows 11 (x64), an internal development build. The full list, with what is only partly done, is on the features page.

  • Reconnection. Transputty reconnects automatically with backoff from 1 second, doubling to 60 seconds, and a keepalive every 30 seconds that gives up after three misses. A rejected login, a changed host key and an unusable key are never retried. Limits: recovery after sleep and after real network changes has been tested by simulation only, and a silently dead link can take about 90 to 120 seconds to detect with the defaults. A login that needs a one-time code cannot reconnect unattended: Transputty asks again, and an unanswered prompt ends as "Failed" after 5 minutes. A remote rule that the server refuses after a reconnect, because it still holds the port from the dead session, is not retried until you click Retry.
  • Listeners during a reconnect. Local and SOCKS listeners stay bound and the rule shows "Port held". A client that connects in that window is held for up to 10 seconds, then closed if the tunnel is not back. The cost: the port accepts TCP connections while the tunnel is down, so a check such as Test-NetConnection passes. The 10 seconds are fixed in 0.1 and the behavior cannot be switched off.
  • Host keys. For a connection created in Transputty, an unknown server shows its SHA256 fingerprint with "Trust and connect" or "Connect once". A changed key blocks the connection with no accept button; you have to remove the saved key first. Limits: a connection imported from an OpenSSH config keeps its StrictHostKeyChecking setting, so accept-new or no saves an unknown server's first key without asking, and the 0.1 editor cannot change that. Host certificates are not supported.
  • Credentials. Passwords are kept in Windows Credential Manager, remembered passphrases are encrypted with DPAPI, and key files are read where they are. A password is held in memory while its connection is on, which is what lets a password login survive a reconnect.
  • Jump hosts. Up to 8 hops, each with its own login and its own host key check. One and two hops were tested against real servers. ProxyCommand is not supported.
  • SSH implementation. Transputty has its own SSH engine and does not run ssh.exe or plink. The trade-off is the one in the checklist: options it has not implemented do not exist, including agent forwarding, X11, certificates, FIDO keys, .ppk keys and Pageant. It can import hosts from an OpenSSH config file and lists every directive it skipped.
  • Visibility. Each rule has its own state, so a connection reads "Connected" with "1 of 4 rules failed" instead of looking healthy. Failures show a reason and a fix; a busy port names the program holding it when Windows reports one. There is live traffic, 24-hour availability and a reconnect log. Limit: the event log is in memory only and cannot be exported.
  • Start at login. A tray icon keeps tunnels running with the window closed, and "Open at login" starts the app in the tray. It is a per-user app, not a service: nothing runs before you sign in.
  • Logins. Password, OpenSSH and PEM key files (Ed25519, RSA with SHA-2, ECDSA), keyboard-interactive prompts including one-time codes, and an SSH agent. Limit: agent support has been tested with a mock agent, not the Windows OpenSSH agent service.
  • License, price and platforms. Not decided. There is no public build and no price. The only app is for Windows 11; a Mac version is planned and not started.
Here a connection reads 'Connected' with '1 of 2 rules failed': the busy port is named along with the program holding it, and the other rule keeps working. The app is connected to local test servers with fictional host names.

What are the other options?

Several kinds of program manage SSH tunnels. In short:

  • OpenSSH with a config file, plus autossh or a service unit on Linux and macOS. Free, scriptable and the reference implementation. No user interface.
  • PuTTY. Free and familiar on Windows; tunnels live inside terminal sessions and do not reconnect by themselves.
  • Terminal suites such as Bitvise SSH Client, MobaXterm and Termius. They include port forwarding alongside a terminal and other tools. That is the better fit if you want one program for everything.
  • Dedicated tunnel managers, the category Transputty belongs to. On Windows, Persistent SSH and Loris Tunnel are examples you can install today; on the Mac, Core Tunnel is an established one.

The alternatives page compares these with sources and dates, and says plainly where each is the better choice. If you have never made a tunnel, start with your first SSH tunnel on Windows. If you would rather start with the mechanics of several, the tutorial on managing multiple SSH tunnels on Windows works through an example with OpenSSH first.

Common questions

What is an SSH tunnel manager?

An SSH tunnel manager is a program that stores SSH port forwarding definitions (local, remote and dynamic forwards), connects them on demand or at login, reconnects them after a network drop, and shows the state of each tunnel. It replaces a set of ssh -L commands kept alive by hand in terminal windows.

What is the best SSH tunnel manager for Windows?

No single SSH tunnel manager is best for every Windows user. Bitvise SSH Client is free and reconnects automatically. MobaXterm includes a graphical tunnel manager, limited to two tunnels in its free edition. Persistent SSH runs tunnels as a Windows service, and Loris Tunnel is a dedicated manager with a free tier. The OpenSSH client built into Windows is enough for one or two tunnels. Transputty, a tunnel-only manager for Windows 11 from Hankinsoft, is in development and cannot be downloaded yet.

Do I need a tunnel manager, or is ssh -L enough?

Plain ssh is enough when you open one tunnel for a short task and can see the terminal it runs in. A tunnel manager starts to pay off when you keep several tunnels open all day, when they have to survive Wi-Fi changes and sleep, when you log in with a password or a one-time code, or when other people need to use them without learning ssh options.

Can I manage SSH tunnels on Windows without the command line?

Yes. PuTTY has a Tunnels panel for forwards inside a saved session, and several graphical programs manage tunnels on Windows, including Bitvise SSH Client, MobaXterm and Termius. Transputty is a tunnel manager for Windows 11 that is in development and has no public build yet. Windows also includes the OpenSSH client if a command is acceptable.

What happens to my application when an SSH tunnel reconnects?

It depends on the tool. With ssh or PuTTY the local listening port closes when the session ends, so the application gets connection refused until the tunnel is started again. Tools that restart ssh reopen the port after reconnecting. Transputty (in development, no public build yet) keeps the local port open during the reconnect and holds each new connection for up to 10 seconds, then closes it if the tunnel is not back. The cost is that a plain TCP port check passes while the tunnel is down.

Is an SSH tunnel manager a VPN?

No. An SSH tunnel forwards individual TCP ports, or acts as a SOCKS proxy for applications configured to use it. A VPN routes network traffic for the whole computer. A tunnel manager needs only an SSH account on the server and, on Windows, no administrator rights, but each application has to be pointed at the forwarded port.

Sources and further reading

Transputty keeps SSH tunnels running on Windows

Local, remote and SOCKS5 forwards in one window, automatic reconnection with ports that stay bound, and a clear reason when something fails. In development; no public build yet.