

- #PUTTY CREATE SSH TUNNEL HOW TO#
- #PUTTY CREATE SSH TUNNEL SOFTWARE#
- #PUTTY CREATE SSH TUNNEL WINDOWS#
PuTTY is listening on the local machines for VNC connections
#PUTTY CREATE SSH TUNNEL WINDOWS#
Here is how tunneling works.Īfter PuTTY is configured and a SSH connection established/authenticated, PuTTY will start listening on port 5901 (or the source port you had mentioned in PuTTY) this can be confirmed using the netstat -aon command from the Windows command line. Other than RELATED and ESTABLISHED connections the rules allow only SSH, ICMP and Loopback interface traffic even then I was able to use VNC on port 5901. Iptables -A INPUT -m state -state NEW -p tcp -dport 22 -j ACCEPT Iptables -A INPUT -m state -state RELATED,ESTABLISHED -j ACCEPT First up the following are the IPTables firewall rules present in my Linux machine. Still not satisfied with my answer let me show you solid proof that the connection is indeed encrypted. So safely click continue, enter your VNC credentials and start using your encrypted VNC connection. That is why you entered “localhost” in the VNC viewer instead of the actual IP address of the Linux machine.
#PUTTY CREATE SSH TUNNEL SOFTWARE#
Worry not my friend this is normal because neither your VNC client software nor your VNC server knows that your traffic is being encrypted because all tunneling and encryption starts AFTER the data leaves the VNC Viewer software and ends BEFORE it hits the VNC server daemon running on your Linux server. OMG what is this ? Connection is unencrypted ? But didn’t you follow this whole thing to tunnel your VNC connection over SSH using PuTTY.

If you are explicitly using the port number use two colons before it What is this isn’t the connection suppose to be encrypted.

Once logged in minimize the PuTTY window and open your VNC viewer software and enter “localhost:5901” replace 5901 with the port number you entered in the SOURCE PORT field of PuTTY under SSH -> Tunnels. Thats it now click open, enter your credentials. Save the configuration so that you can do not have to enter the setiings each time Under “Saved Sessions” specify a name and click the save button. You will now see the setting under “Forwarded Ports”.Ĭome back to the “Session” page to save these settings as a session so that you do not need to enter them each time. Leave all the other radio buttons to their defaults and click the Add button. The source port can be any number, I am entering the same number just to avoid confusion. Hence I will be using port 5901 as the destination. Vncserver :1 -geometry 1366x768 -depth 24 I have configured a VNC session on my Linux server with the following command. Enter the Linux Server details in PuTTYįrom the Category section expand “SSH” and select “Tunnels”, enter both the source port as 5901 (any port number will do) and destination as :5901 eg. Leave the port number to 22 if you did not change the default SSH port number on the Linux Server. Open PuTTY and enter the IP address/Hostname of the Linux server. This article assumes that a VNC server software has already been installed on the target Linux computer and a VNC session has been created. First I will show you how this is done through the GUI and then by using command line parameters of PuTTY which are very similar to the “ssh” command in Linux. This is just an example of tunneling VNC traffic through PuTTY you can tunnel almost any traffic (eg HTTP, FTP) by changing port numbers.
#PUTTY CREATE SSH TUNNEL HOW TO#
This article will show you how to use the popular terminal emulator PuTTY to create a SSH tunnel to pass VNC traffic which is normally unencrypted. The SSH protocol has a unique feature of tunneling other protocols and encrypting them.
