VNC via SSH tunneling


5 simple steps to connect through VNC to office/work PC via SSH tunneling


You have to connect to your office PC from home via VNC, but your office PC does not have a public IP. The only way to access your PC is through one of the access point machines provided by your office that can be reached through Internet.


VNC port is 5900. You can ssh tunnel to your office PC through your office access point, and connect to this tunnel to have VNC connection.


Office access point machine:
Internal IP of your office machine:

Also assume that your Office PC is switched on, and access point machine can access your office PC via the internal IP, and can access its ports as well.


  1. SSH to access point machine. Provide password when prompted
    ssh [email protected]
  2. Now that you are on access point machine, ssh from there to your office PC. Again provide password when prompted.
    ssh [email protected]
  3. On your office pc, start VNC server. Keep this terminal open.
  4. On another terminal, make open a tunnel to your office pc via the access point. Provide the password for your access point machine when prompted.
    ssh -L [email protected]
  5. Use an VNC viewer to connect to your Office PC via the tunnel. Use the following details:
    Host: localhost
    Port: xxxx

blog comments powered by Disqus