Okay so today were going to take a look at a great feature of PuTTY that maybe some of you may not have been aware of. Port forwarding of a remote machine through a secure SSH tunnel. There are many reasons for doing this the main being it is secure. Everything over SSH is encrypted that is why doing things via SSH takes little bit longer than with lets say an FTP connection, or a Telnet session. Another reason might be is a service your wanting to use on the remote machine is not being forwarded through the router.

With all the this in mind lets begin the tutorial…

  1. Open PuTTY. If your using a connection that is saved highlight it and select ‘Load’. Otherwise fill in the usual connection info. (Host Name, and Port).
  2. Go to the left in the ‘Category’ window and click the ‘+’ sign next SSH. You should see the sub menu ‘Tunnels’ click on it.
  3. Now you should see two empty fields that say ‘Source Port’ and ‘Destination’.
  4. In ‘Source Port’ your going to enter a random unused port number say ’8806′ (Eventually you are going to enter that port number in the client software connection info).

    In ‘Destination’ you are going to put ’127.0.0.1:3306′ or ‘localhost:3306′ (Sub out 3306 for the actual listening port of the server your trying to connect to in this case I am using MySQL).

  5. Click ‘Add’.
  6. Click ‘Open’ at the bottom.

If it works PuTTY will connect as normal, make sure you login.

Now to test it out you open the client software I will be using MySQL Administrator in my case. Enter ’8806′ in the port number and in the host information make sure you enter ’127.0.0.1′ or ‘localhost’.