I wish to be able to connect to my windows box with VNC. I installed TightVNC and freesshd. I set up TightVNC to serve on 5899, and freesshd to serve on 2223. (TightVNC advice on port forwarding.)
If I port forward 5899 and 2223 on my router, I can connect both directly (on 5899) and through ssh port forwarding:
ssh -p 2223 -L 5699:<myip>:5899 myaccount@<myip>
and connecting to localhost:5699. So far so good.
However, if I close port 5899 on my router, I can't connect even using ssh port forwarding. I get this message on the windows console that I have ssh-ed to:
channel 3: open failed: connect failed: Connect failed
Looking in the logs shows a lot of stuff I don't understand. "ssh -v" shows that it is trying to port forward local 5699 to remote 5899, which is correct.
I'd like to close 5899 if I can, because that is an open VNC port without an account name, it just has a VNC password (with a length restricted to 8 characters!). Seems insecure.
How do I close 5899 and still be able to connect via ssh tunneling?
Note: I read Why can't I connect to my VNC server from outside my network? and didn't see how to apply the advice there.