ssh and vnc port forwarding

Ok, I have been all over the net and it seems this trick has been tried and can succeed.

I am trying to tunnel a VNC session through a secure shell. What I have are 2 windows XP boxes and a linux server in the middle for the shell.

I establish a tunnel for the server localhost:5900 and tell it to forward to 5900 on the linux machine. Client Establishes an outbound tunnel to 5900 on linux machine:

vncserver (listen 5900)

Reply to
Christian Bongiorno
Loading thread data ...

You have to edit a registry entry before the Windows VNC viewer will accept to talk to its own machine. I forget the details, so read the online help.

Alternative: try tunnelling (windows tcp:5901) to (linux tcp:5900) and run the VNC viewer to "localhost:1". That may work without a registry tweak.

Reply to
Pierre Asselin

There is an older step by step guide in PDF format at the link below. I think it covers the loopback settings. You definitely need to check that setting as it sounds like that is all you are missing.

formatting link
You can also read my article on hotspot tunneling in the latest 2600 magazine that covers the concepts behind routing through the ssh tunnel. Good for protecting your traffic when on public hotspots.

Reply to

On certain VNC version loopback connections are disabled for some reasons. I have seen a VNC installation recursivly reconnecting to it's own server, which is not really what you want.

I am reguarly using TightVNC V1.3dev5 (unstable) on my XP-NB, and nearly every day, i'm tunneling VNC thru firewalls, and it really works great


for the above mentionened, i'm using this type of tunnel:

"ssh -L 5900:remote-vnc-machine:5900 user@remote-server-host".

Reply to
Marc Herrmann Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.