Using Putty to connect to an SHH tunnel

If in Linux you use this command to make a tunnel:

ssh -p 32642 -L 3308:something:3306 -N -i ~/.ssh/id_rsa

Then this is how you translate the above command into a Putty configuration session.

Download Putty and install it:

Configure Putty:
  1. In the “Session” category:
    1. Create a new session by typing its name in “Saved Sessions”.
    2. Fill “Host name or IP address” ( and “Port” (32642) and make “connection type” SSH
  2. Go to “Connection” => “Data”:
    1. Set “Auto-login username” (tunnel)
  3. Go to “Connection” => “SSH”:
    1. Check “Don’t start a shell or command at all”
  4. Go to “Connection” => “SSH” => “Auth”:
    1. Click on “Browse..” and load a ppk key (or convert other private keys using the included Puttygen software)
  5. Go to “Connection” => “SSH” => “Tunnels”:
    1. Check “Local ports accept connections from other hosts”
    2. Fill “Source port” (3308) & “Destination” (something:3306) and click on “Add”
  6. Go to “Session” and save this config and click on “Open” to start the session

Test if this port is connected by running CMD as admin and type netstat -a -b you should see a that port 3308 used.

Next time you want to open a tunnel, open Putty and double click on the name of your saved session and voila!

One thought on “Using Putty to connect to an SHH tunnel

  1. Han says:

    Good! Thanks 🙂

Comments are closed.