Connecting via VNC

by K Scott Rowe last modified Mar 27, 2017 by Patrick Murphy
Contributors: jrobnett, ebryer, mhatz, pmurphy

Accessing the Cluster Remotely with VNC

While ssh will work fine if you are on the internal NRAO network, if you are trying to display things from a remote site we recommend using VNC.

Connect to the NRAO

From your local machine, login to the ssh portal ssh.cv.nrao.edu with your username (e.g. cv-4386).  Skip this section if you are physically at the NRAO.

For Linux and Mac Machines

ssh cv-4386@ssh.cv.nrao.edu

For Windows Machines

Install PuTTY, fill in the Host Name field and click Open.

Start the VNC Server

From the ssh portal, or some other NRAO machine, login to the node assigned to you (e.g. cvpost050)

ssh cvpost050

and start a VNC server with the following command

vncserver

The first time you run this, it should prompt you to set a password.  Do not use the same password as your username.  The system should then return something like:

New 'cvpost050:1 (cv-4386)' desktop is cvpost050:1

The 1 in this example is your session.  You will need this number later when you use your VNC client.

Connect to the VNC Server

The VNC Client used to connect to the VNC server is different depending on the OS you are using (Linux/RHEL, Linux/Ubuntu, MacOS)

Linux (RHEL, CentOS, SL, OEL, Debian)

If your local machine is an RHEL or Debian derivative, use vncviewer to start the VNC connection like so (assuming the session number is 1)

vncviewer -via cv-4386@ssh.cv.nrao.edu cvpost050:1

If you are physically at the NRAO, skip the "-via" syntax like so

vncviewer cvpost050:1

Linux (Ubuntu)

If your local machine is Linux/Ubuntu, use remmina to start the VNC connection like so (assuming the session number is 1)

Launch the remmina program and select Connection -> New

 

Set the Name to something descriptive like NRAO Cluster, change the Protocol to VNC - Virtual Network Computing, set the Server to the node assigned to you followed by a colon and the session number (e.g. cvpost050:1), set the User name (e.g. cv-4386).  If you see Repeater, leave it blank. Then select the SSH tab

 

Check the box for Enable SSH tunnel, select Custom and set it to ssh.cv.nrao.edu, set the User name (e.g. cv-4386), click on Save.  The window will disappear (Ubuntu 16+) so then right-click on the entry for this connection in the main remmina window and then choose Connect.

 

 

Mac

There are two general ways of connecting on a Mac. 

Built-in Screen Sharing

This assumes you are connecting from the outside.  First, establish a tunnel to the relevant node in a terminal window:

ssh -L5901:cvpost050:5901 -n ssh.cv.nrao.edu

Leave that terminal in the background.  Then in the Finder, Pull down the GO menu and choose Connect to Server. For the server address, specify:

vnc://localhost:5901

You will be challenged for the VNC password you set up (likely at the time you launched the vnc server).

 

Add-on Software (Chicken)

CAUTION: The "Chicken of the VNC" client has not had updates in some time and may be abandoned.  Use only with caution.

If your local machine is Mac, use a VNC client like Chicken with the following setup (assuming the session number is 1).  If you are physically at the NRAO, leave the "SSH Host" line blank.

Host: <node assigned to you> (e.g. cvpost050)

Display or port: <the session from above>  (e.g. 1)

Password: <the VNC password you created above>

Tunnel over SSH check this box

SSH Host: <username@ssh.cv.nrao.edu> (e.g. cv-4386@ssh.cv.nrao.edu)

Windows

If your local machine is Windows, use a VNC client like the Java Viewer from TightVNC with the following setup.  The port number can be found by adding 5900 to the session number.  So in the above example, with a session number of 1, the port will be 5901.  If you are physically at the NRAO, leave the "SSH Server" line blank.

End the VNC Server

Commands that are run in this VNC session will continue to run even after closing your local VNC client. Once all processes are done, you should close your VNC server by connecting via ssh again to the nmpost cluster node and running (assuming the session number is 1)

vncserver -kill :1