If in Linux you use this command to make a tunnel:
ssh tunnel@my.example.de -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:
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Configure Putty:
- In the “Session” category:
- Create a new session by typing its name in “Saved Sessions”.
- Fill “Host name or IP address” (my.example.de) and “Port” (32642) and make “connection type” SSH
- Go to “Connection” => “Data”:
- Set “Auto-login username” (tunnel)
- Go to “Connection” => “SSH”:
- Check “Don’t start a shell or command at all”
- Go to “Connection” => “SSH” => “Auth”:
- Click on “Browse..” and load a ppk key (or convert other private keys using the included Puttygen software)
- Go to “Connection” => “SSH” => “Tunnels”:
- Check “Local ports accept connections from other hosts”
- Fill “Source port” (3308) & “Destination” (something:3306) and click on “Add”
- 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!
Good! Thanks 🙂