: Wolfgang Ebersbach <(E-Mail Removed)>
: The host running the VNC server ist "vnc_server" The host which should
: connect to the VNC server via the firewall is "vnc_client"
:
: now, you need to run "ssh -L 5901:vnc_client:5901 vnc_server" on the
: vnc_client machine, whci is what the VNC documentation about this
: issue sais, too:
:
http://www.uk.research.att.com/archive/vnc/sshvnc.html
That's not what needs to be done, and that's not what that web page says
to do. Running that command on vnc-client will attempt to forward a
port on vnc client to the same port on vnc client, which is pretty much
guaranteed to be quite useless at best.
What it says on that page is
ssh -L x:localhost:y snoopy
Note that "localhost" is evaluated on snoopy, and NOT on the host
upon which you execute the command. The -L forward syntax is x:h:y, where
x is the localport to forward from, h is the host relative to the
server, and y is the port on the server to which connections will be
forwarded. Thus you should either say
ssh -L 5901:localhost:5901 vnc-server
or possibly
ssh -L 5901:vnc-host:5901 gateway
if the gateway firewalls in such a way that the vnc server
isn't directly visible.
: If you run "ssh -L 5901:vnc_host:5901 your_gateway" on machine
: "your_gateway", you establish an ssh connection from "your_gateway" to
: "your_gateway" which is not what we want to do.
No, that establishes a port forward from the host you run the command on
(which is implicit in the x:host:y syntax), to a port on vnc-host, where
the name "vnc-host" must be visible to gateway. Which is quite useful,
if vnc-host isn't visible from where you run the command, but is
visible from the gateway.
Note that the unix version of tightvnc has a -via option which
can be used to do both ssh and vnc connections in one swell foop:
vncviewer -via vnc-host localhost:1
or
vncviewer -via gateway vnc-host:1
or however the visibility works in the particular case.
Wayne Throop
(E-Mail Removed) http://sheol.org/throopw