I'm trying to access my home server remotely and I only have port 22 available to me. From what I understand it's possible to tunnel into the server to be able to view VNC.

So far all my efforts have failed. I followed the digital ocean tutorial to set up VNC. I can successfully telnet localhost 5901 on my home server using SSH.

However the local part gets a bit wonky for me. On putty I set up the tunnel:

Source 5900

Destination mydomain.com:5900

I also tried replacing 5900 with 5901 in the source and destination part.

In TightVNC I try to connect like localhost:1 but I immediately get "Connection closed gracefully". No idea what's going on.

  • At what point there are you configuring it to use port 22? – Rowland Shaw Dec 7 '14 at 17:12
  • @RowlandShaw configuring what? For putty I just set the port in the session tab to 22. Server side I didn't think I had to do anything – Ortix92 Dec 7 '14 at 17:36
  • From your question title, I thought you wanted VNC to run over port 22? – Rowland Shaw Dec 7 '14 at 18:47

If the VNC server and the ssh server are the same, then use a destination of instead of the hostname.

Also, make sure that the tunnel is a "local" tunnel and not "remote" or "dynamic".

Also, if your test confirms port 5901 works, then you should use the same port in your tunnel, probably for both source and destination.


Once logon SSH by Putty with above settings, please keep it logon then you should able to use TightVNC connect to localhost:5900 (or 5901).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.