Tutorials
SSH tunnel tutorials
Step-by-step instructions for setting up, using and fixing SSH tunnels. Each tutorial gives the plain OpenSSH commands first, so it works with the tools you already have, and then shows the same task in Transputty.
Transputty is in development and has no public build yet (release status). The OpenSSH and PuTTY steps in these tutorials work today; the Transputty steps describe the current development build.
New to the subject? Start with your first SSH tunnel on Windows: it takes about 7 minutes and needs nothing installed. Then, if the tunnel is for a database, go to the database tutorials. SSH port forwarding explained is the background reading.
Windows
Getting started with SSH tunnels on Windows 11, with the built-in OpenSSH client, PuTTY or Transputty.
- How to create your first SSH tunnel on WindowsMake your first SSH tunnel on Windows three ways: the built-in OpenSSH client, PuTTY and Transputty. Includes how to test it, stop it and fix common failures.Beginner · 8 min
- How to manage multiple SSH tunnels on WindowsRun many SSH tunnels on Windows without losing track: one ssh config with LocalForward lines, a port numbering plan, PuTTY saved sessions, and Transputty.Intermediate · 8 min
SSH port forwarding tutorials
Local, remote and SOCKS forwarding and SSH keys, one task at a time.
- How to set up SSH local port forwardingThree worked ssh -L examples with commands and checks: a web admin page on the server, a database behind a bastion, and RDP to an internal Windows PC.Beginner · 7 min
- How to set up SSH remote port forwardingSet up ssh -R step by step: expose a local dev server on a remote port and reach a machine behind NAT, with the sshd settings, checks and security cautions.Intermediate · 9 min
- How to set up an SSH SOCKS proxy on WindowsSet up an SSH SOCKS5 proxy on Windows step by step: start it with ssh -D or PuTTY, point Firefox, Chrome or Edge at it, and check the exit address.Beginner · 7 min
- How to use SSH private keys for tunnelsCreate an Ed25519 SSH key on Windows, install it on the server, fix key file permissions with icacls, convert PuTTY .ppk keys, and use the key for tunnels.Beginner · 8 min
Databases
Reach PostgreSQL, MySQL, MariaDB and SQL Server on private networks from any client.
- Connect to Microsoft SQL Server through an SSH tunnelTunnel Microsoft SQL Server over SSH: fixed TCP ports instead of named instances, the 127.0.0.1,port syntax, encryption settings and errors 26, 53, 40, 18456.Intermediate · 9 min
- Connect to MySQL through an SSH tunnelReach a private MySQL or MariaDB server with ssh -L: the command, why -h localhost fails, account host matching, bind-address and errors 2002, 2003, 1045, 2013.Intermediate · 9 min
- Connect to PostgreSQL through an SSH tunnelReach a private PostgreSQL server with ssh -L: the command, psql and URI connection strings, sslmode through 127.0.0.1, pg_hba.conf and the common errors.Beginner · 10 min
Troubleshooting
Start from the error message and work back to the cause.
- Local port already in useFix bind: Address already in use for ssh -L: find the process holding the port on Windows, macOS and Linux, and why Windows ssh says Permission denied.Beginner · 9 min
- SSH tunnel "connection refused"Connection refused through an SSH tunnel comes from one of three places: the SSH server, your local forwarded port or the destination. How to tell which.Intermediate · 9 min
- SSH tunnel keeps disconnectingWhy an SSH tunnel drops with Broken pipe, Connection reset or a timeout, and how to fix it with ServerAliveInterval, PuTTY keepalives, autossh or systemd.Intermediate · 10 min