SSH gives you a terminal window to a remote machine. You can use it to run commands on the remote machine such as emacs, gcc, make, and the submit script for the course, but each command runs in the same window, and graphical user interfaces are not supported.
VNC is a protocol for Virtual Network Computing. It allows you to create a virtual Zoo desktop in a window on your own machine. Once created, it's almost like sitting at a Zoo console. In particular, you can run programs that use a graphical interface such as file browsers, graphical text editors, IDE's such as Eclipse, and so forth. The downside is that it's complicated to set up.
Both access methods require that you have an SSH client
program installed on your machine. If you are running Mac OS-X or
Linux, ssh and slogin are probably
already installed by default. If not, you should install the
openssh package. Windows
users should install SSH version 3.2.9, available to those in the
Yale community through the ITS Software Library.
To use VNC, you will need a VNC viewer in addition to an SSH client. Mac users should install Chicken of the VNC. Linux and Windows XP users can download free viewers from TightVNC or from Real VNC. The Zoo is running the TightVNC server, but both viewers should work with it. For Windows, I have only tested TightVNC 1.3.9 under XP. I don't know if it works under Vista or not
To log into the Zoo using any of the ssh clients, you need to
select a host and give your user name and password. For the host,
you can use the pseudo host name
node.zoo.cs.yale.edu, which will automatically
connect you to one of the Zoo clients based on load.
Before you can use VNC, you must log into the Zoo and set up
your Zoo account by running the script /c/cs223/bin/vncconfig.
This will create a subdirectory .vnc in your home
directory and a password for accessing your VNC desktop.
Now, to create a VNC session, you must do the following:
Log into any Zoo node using SSH as described above. After
logging in, use hostname to find out which node
you are actually running on. (You will need this later.)
Start vncserver on the Zoo node by typing the
appropriate command into the SSH window opened in step 1. You
will have to tell it what size window you want to work with.
For example,
vncserver -geometry 1024x768
will start a server running on a virtual 1024x768 display.
Look at the output produced by the server when it starts up
to find the X display number. It will have the form of a
colon followed by a number. The display will generally be
:1, but it will be higher if someone else is
also running a VNC server on the same node.
The VNC X server started in step 2 listens for connections on port number 5900 + X display number. For example, if your X display number is :2, the corresponding port is 5902. You now need to use SSH again to forward this port to your local machine. How to do this depends on your SSH client and is explained in greater detail below.
Start a VNC viewer on your local machine. It should be
told to connect to server localhost and the X
display number from step 2. How to do this depends on which
VNC client you are using and is explained in greater detail
below. If all goes well, you will be prompted for your VNC
password that you established when setting up VNC. Type your
password and you should be connected.
When you are done, be sure to log out cleanly. Otherwise, you will leave behind running processes on the Zoo node. This is in violation of Zoo policy of using only one node at a time and will also make you unpopular with your fellow Zoo users. To log out, end your Zoo session in the normal way. At that point, you can close the connection on your local machine and then log out of any SSH sessions that you are still logged in from from steps 1 and 3.
Here's how to do steps 3 and 4 depending on which client packages you are using. In the examples below, we assume your Zoo user name is abc98, your server is running on newt.zoo.cs.yale.edu, and the X display number is :2.
The Linux vncviewer provides the
-via option which combines steps 3 and 4. You start
the VNC client by typing a command in a local terminal
window:
vncviewer -via abc98@newt.zoo.cs.yale.edu localhost:2
When asked for your password, you should enter your Zoo password. After that, a dialog box should appear asking you for your VNC password.
Chicken of the VNC appears not to support the
-via option, so it's necessary to set up the tunnel
separately. Open Terminal.app and type the following command:
ssh abc98@newt.zoo.cs.yale.edu -N -L localhost:5902:newt.zoo.cs.yale.edu:5902
When asked for a password, you should enter your Zoo password, not your VNC password.
To connect to the VNC server, start Chicken of the VNC. You
will get a VNC Login dialog box. Fill in Host:
localhost, Display: 2 (in this example), and
Password: (your VNC password). Click on Connect and your VNC
desktop should appear.
I'm assuming you have already figured out how to use SSH Secure Shell to open an ordinary terminal connection to the Zoo. (You need to set up a Connection profile with Host name newt.zoo.cs.yale.edu and user name abc98.) To set up tunneling, click on Edit->Settings. Select Profile Settings->Tunneling. Click on Add, then select the Outgoing tab. Name your tunnel "VNC". Listen Port 5902 (in this example), Dest Host newt.zoo.cs.yale.edu, Dest Port 5902, Allow Local Connections Only Yes, Type tcp. Click OK.
To connect, press Enter or Space in the main window. A dialog box Enter Authentication Response should appear. Type in your Zoo password. Click OK and then again to the new Enter Authentication Response box. You are now logged into the Zoo, and the VNC port 5902 is forwarded through the encrypted SSH tunnel to your machine.
Now start TightVNC Viewer. In the box New TightVNC Connection,
type localhost:2 for the VNC server and click on
Connect. In the Standard VNC Aut... box, type your VNC password.
After a brief pause, your Zoo desktop should appear.