Remote VNC over SSH

Quick tip.

Ever been away from your PC and really wished that you could view your desktop. You could always do a port forward to VNC on your PC from your router, but you may not have this option.
Another option is to tunnel your VNC through a server on the network.

ssh -L 5900:INTERNAL_IP:5900 username@PUBLIC_IP

This creates a SSH connection to your server and listens locally on port 5900 for data which is sent through the SSH connection to your destination internal IP.

Once you have the ssh connection established you can then open your VNC viewer and connect to 127.0.0.1. This should then pass the data through to your PC.

Leave a Reply