If you have an SSH server and want to establish a secure connection with your VNC server, you can use the system you already have to make this possible.
Use the port forwarding technique to pass traffic through an SSH connection because by default the firewall on the remote network will not allow direct connection to port 5900, which is the port number that VNC listens by default and for security reasons, it is recommended not giving access to this port on the internet.
Before trying this tutorial, you should have the following:
- Two devices with Windows 10 and UltraVNC installed (To find the direct link to the software, type: ultravnc in the bookmark).
- The PC you want to connect to must have ultra VNC server installed. In addition, have a password setup on it and you must know the VNC password.
- Know the IP address or the hostname of the VNC server and the port number that the VNC server listens on.
- An SSH server on the local network to which you want to connect.
- Know the IP address or the hostname of the device that has the SSH server and the port number that the SSH server listens on.
- Have plink or putty installed on the computer you will be using the VNC client.
Another blog post I wrote that may be of interest to you “How to Install Putty on Windows 10”
This blog post provides information you need to access your computer from anywhere with VNC and SSH. Please review all requirements before proceed with this guide.
Step 1: Configuring an SSH tunnel using Plink
Open command prompt and type: plink -ssh -i ssh-private-key -L Local-Port-Forward-on-vnc-client:local-ip-address-of-the-remote-pc:listening-VNC-port-on-the-remote-computer -P port-of-ssh-server user@ssh-server-ip-address-or-ssh-server-hostname
plink -ssh -i amazonkey.ppk -L 5977:172.16.40.77:5900 -P 31587 firstname.lastname@example.org
When you finish writing the information, press Enter.
If this is not the first time you log on to this remote computer and you see a different key fingerprint, there’s a big chance it’s a man in the middle attack SSH.
If everything is correct, press y to store the key in cache and when you see on the screen “press return to begin session”, press enter
Now, you are connected to the SSH server and a local port to connect to the remote PC is listening on port 5977 on your windows computer.
Step 2: Connect to remote computer with UltraVNC
Go to the Windows 10 search bar, type vnc, then select UltraVNC Viewer.
Type localhost or 127.0.0.1 and the local port you just setup for the ultravnc.
Click connect to access the remote computer who is running the VNC server.
In the VNC authentication window, enter the password of the remote VNC server, then click Log On.
Video to show you how to access your computer from anywhere with UltraVNC and SSH
What To Read Next
- How To Generate SSH Key On Windows 10
- Access RDP over the internet securely
- Enable ssh on pfsense firewall
- How to block internet access to any website on Windows