6
2
I'm trying to setup a ssh tunneled vnc connection from my centos 5.10 machine and I've been following some online tutorials such as this one: https://wiki.archlinux.org/index.php/Vncserver. I'm running the server like this: $ vncserver -geometry 1024x768 -localhost :1
and connecting with an openssh client like this: ssh -f me@vnc.machine -L 5900:vnc.machine:5901 -N
. Then I connect with realvnc viewer to localhost:5900. For some reason this doesn't work if I use the -localhost param, but it works great if I leave it out. All of the guides say that it's more secure to use it. I'm thinking this might be a configuration issue on the server side, but I'm pretty much stumped at this point and I've tried a lot of stuff. Can anybody tell me why this is happening?
strange -localhost doesn't seem to do anything – thang – 2019-08-18T08:08:29.803
Maybe I'm confused, but wouldn't that just forward port 5900 from the client machine to 5901 on the client machine? – shwoseph – 2014-02-12T02:59:55.727
3No, it forwards 5900 on the client machine to 5901 on
localhost
-- from the point of view of the server, not the client. Solocalhost
would refer to the server. – jjlin – 2014-02-12T05:37:56.547