Connect to remote VNC with only port 22 using putty

0

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.

Ortix92

Posted 2014-12-07T16:02:56.373

Reputation: 791

At what point there are you configuring it to use port 22? – Rowland Shaw – 2014-12-07T17:12:30.147

@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 – 2014-12-07T17:36:55.593

From your question title, I thought you wanted VNC to run over port 22? – Rowland Shaw – 2014-12-07T18:47:56.167

Answers

1

If the VNC server and the ssh server are the same, then use a destination of 127.0.0.1 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.

Jez

Posted 2014-12-07T16:02:56.373

Reputation: 21

0

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).

Eric Leung

Posted 2014-12-07T16:02:56.373

Reputation: 302