Hi Louis,

<snip>

> > If VNC on your server is on port 5500, you might do:
> 
> Louis> How do I find out the vnc server port number when I start
> vncserver ?
> 
The default on my system is 5901 you could try that, or

netstat -lp -A inet 

will show you all the listening sockets, and what program is using them.
You could run that while vncserver is up and look for Xvnc in the list.

> > 
> > ssh -C -L 5501:server-ip-address:5500
> 
> Louis> Are you saying here, from Putty or Teraterm I connect 
> to my server using the above command. Once connected
> to the server I start vncserver ?
> 

No, I was speaking about using the ssh client from a Linux client
machine. Putty can do this too, but you need to mess with the settings
in Putty rather than use the command line. It's under port forwarding I
think.

Also, it really should have been
 
ssh [server-name-or-ip-address] -C -L 5902:[server-ip-address]:5901

I left out the hostname to connect to :/

If your server doesn't automatically have vncserver running then you
will have to start it, yes. I think ssh/putty will still handle the port
redirection even if nothing is listening when you first connect.

> Is "ssh" the ssh daemon ? Why is listen port is "5501" ?
> Is it always one higher than the vnc port number ?
> 
> 
No, it's the ssh client. Sorry, I assumed you were connecting from
linux.

What it does is to make the server port appear as if it were on your
local system. You then connect to your local system with vncviewer, and
ssh does the magic port redirection stuff across the secure channel to
the server.

I chose one higher in case you have a vncserver running on the same port
locally. If not, you can use the same port number.


> > 
> > then, on your local machine (not in the ssh session) you can type:
> > 
> > vncviewer localhost:5501 
> 
> Louis> Do I really enter "localhost" or "ip_address_of_server:5501" ?
> After I start vncviewer ?
> 

localhost (or 127.0.0.1) would work, I don't know the real server IP so
you can replace that part.


Felix


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to