ssh with localhost

Scott Hyde hyde@gauss.math.montana.edu
Sun Nov 17 12:59:01 2002


I've been successful in initiating vncserver with the -localhost option by
the command

ssh -L 5901:localhost:5901 vncservermachine

and then intiating a connection on vncviewer to localhost:1

How do you initiate a connection similar to the Alice, Bob and Charlie
computers that are on the VNC documentation.

Suppose that Charlie is not available to the internet as a whole, but Bob
is able to access Charlie through ssh.  Bob is connected to the internet
so Alice can connect to Bob through ssh.  However, Alice can't connect to
Charlie directly, but through Bob.

Suppose Charlie has vncserver with the -localhost option running.  How can
Alice connect to Charlie with vncviewer?

I've tried the following two commands without luck

ssh -L 5901:bob:8989 bob
then in the ssh shell for bob type

ssh -L 8989:localhost:5901 charlie

But it doesn't seem to work.


-Scott