vnc via ssh

Vilica

Senior member
Jul 27, 2002
413
0
0
I'm having a bit of trouble with understanding the steps required to tunnel vnc through ssh, and most all of the tutorials assume either a windows/linux interface or a router/lan.

Basically, I want to connect to my windows box via vnc from any other computer. I'm at an edu, and thus I have a unique public ip. Now how exactly do I run the ssh protocol as a server to go windows -> windows? I have SSH Secure Shell that I can use, but I don't know what settings I need to enable/disable, and what ports I need to forward. Do I need to create a profile that always listens on 5900, and then set vnc to listen on a non-standard port like 9501 and forward the tunnel to there? How do I always listen?

To diagram what I think needs to happen, I would do the following.

Lab computer -> Run the WinVNC client -> connect to my Windows machine public ip -> have that port 5900 forwarded as a local loopback connection to display 0 via ssh tunnel (?) -> Windows display, and back

or is it Lab computer -> winvnc to XXX.XXX.XXX.XX:9500 (my public ip:non-standard vnc port) -> have ssh running in the background (how?) listening on 9500, and create a tunnel (how again?) to localhost:5900 -> Windows desktop?

Do I need to create a profile in SSH that automatically does that, and leave that terminal open when I want to vnc?

As you can see, I'm very confused as to the abilities of VNC and SSH, and howto configure each separately. Just as a FYI, I'm using the new 4.0beta of WinVNC, and SSH Secure Shell v3.2 built 267. Any help provided would be much appreciated.

As an aside, I have a linux box available, if that would prove helpful, and I also have a thing called WinSSL that I've used to encrypt my irc... can I use that to encrypt vnc as well?
 

bex0rs

Golden Member
Oct 20, 2000
1,291
0
0
You need an ssh server to connect to at the other end of your tunnel - in this case your windows box that's also serving vnc. Open SSH for Windows will do the trick.

The idea will be to use your ssh client from lab to create a tunnel to your home computer and set up a 'local' port forward. This creates a listen port on the lab computer, which you then connect to with the vnc client and your connection will be encrypted.

~bex0rs