Difference between revisions of "Using a VNC Server/Client"

From Hall A Wiki
Jump to: navigation, search
(Setting up the VNC Server)
 
(45 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
= Adapting the Connection/Tunnel Instructions for other Hosts =
 +
== General Users ==
 +
* The same instructions can adapted for general users, but you need to make the following substitutions:
 +
    '''username''':  change ''hacuser'' to ''<your CUE username>''
 +
    '''hostname''':  change ''hacweb14'' to ''jlabl5''
 +
    '''gateway''':  change ''hallgw'' to ''login.jlab.org''
 +
I recommend connecting to a general JLab machine (like jlabl5) and then
 +
ssh'ing to a Hall machine or ifarm host from there.
 +
 +
== Hall A Techs ==
 +
* NOTE: The instructions below use the username and hostname for '''Hall A'''.
 +
  '''username''':  ''hacuser''
 +
  '''hostname''':  ''hacweb14''
 +
 +
'''NOTE''': Some of the snapshots use ''hacweb2'' instead of ''hacweb14''.
 +
I think the ''correct'' machine these days is ''hacweb14''.  Ask Heidi to be sure.
 +
'''A proper setup will use only one ''hacweb'' machine name.'''
 +
 +
== Hall C Techs ==
 +
* The same instructions can be used for Hall C, but you need to make the following substitutions:
 +
    '''username''':  change ''hacuser'' to ''hccuser''
 +
    '''hostname''':  change ''hacweb14'' to ''hccweb1''
 +
 +
=== Hall C Cryo Controls ===
 +
* Once you are connected to hccuser@hccweb1 using VNC, then you can access the HMI magnet and cryo controls using the icon in the top toolbar.
 +
** That icon opens a shared session to the cmagnets@controls8 Windows10 desktop in a new window.
 +
 +
* If the magnet controls are already running, then the new window should look similar to this.
 +
[[File:hccweb1desktop.png|500px|hccuser@hccweb1 desktop (empty)]]
 +
* Otherwise, you will need to run the HMI software using the shortcut on the desktop as noted in the above snapshot.  The HMI screen should look something like the snapshot below.
 +
[[File:controls8desktop.png|500px|controls8 desktop with HMI software running]]
 +
 +
= VNC Server Management =
 +
* This rarely needs to be done.  Once it is started it will stay running even after you disconnect.
 +
** There is a crontab entry on the hacweb/hccweb machines that should restart the server on a reboot.
 +
 +
== Setting up the VNC Server ==
 +
* Note the '''VNC Session ID'''  set up by the ''':NN''' option below needs to be unique on the VNC server host.  I'm using ''':1''' here,  but that may be occupied by another server on other hosts. In that case the <code>vncserver</code> command  will fail.  Try again with another ''':NN''', where '''NN''' is any 1 or 2 digit number until the vncserver report a successful start.
 +
** If this is done, then you need to make the following changes to the '''Step 2''' tunnel.
 +
*** Replace '''5901''' with '''5900+NN'''  (If NN=13, then use port 5913 instead of port 5901.)
 +
** Also use ''that'' ''':NN''' when you run <code>vncviewer</code>
 +
 +
* Log in to hacuser@hacweb14 (or whatever ''user@host'' you want to use, ''ie.'' <you>@jlabl5, etc) the way you typically would.
 +
 +
* If this is the first time you are setting up a VNC server in your account, then you will need to set a password.  It doesn't need to be your JLab CUE password... but it's still a password.  So be cryptic.
 +
  [user@host]# vncpasswd
 +
 +
* Start the vncserver by running:
 +
  [user@host]# vncserver -geometry 1900x1100 :1  (where :1 is the VNC session ID)
 +
* You can now close that window and the VNC server will remain running.  Proceed to connect to the VNC server using the instructions below.
 +
 +
NOTE: Some newer versions of TigerVNC will give a warning:
 +
        "WARNING: vncserver has been replaced by a systemd unit unit and is now considered deprecated..."
 +
      Just ignore it.
 +
 +
== Killing the VNC Server ==
 +
This will quit the server and all applications that were running under that server.
 +
  [hacuser@hacweb14]# vncserver -kill :1  (where :1 is the VNC session ID)
 +
 +
= Instructions for Linux / Windows 10 / Mac =
 +
 +
The ssh configuration for a Mac is done through the Terminal program following the linux instructions. 
 +
 +
This is a 2-step process.
 +
 +
=== Step 1: Tunnel between your machine and JLab ===
 +
* Open a Terminal window
 +
** Windows10: Type '''command.com''' in the search bar and run the program.  A black terminal window should appear.
 +
* Run the following command:
 +
'''ssh -L''<port>'':hacweb14:22 ''<username>''@hallgw.jlab.org'''
 +
* Use your JLab username and your 2-factor password.
 +
* Replace '''<port>''' with '''2300 + the last 2 digits''' of your phone number.
 +
** Note: the '''port''' in this step needs to be unique for each person connecting.  The 'phone number' thing is just a way to make a number likely to be unique to you.  For example, if your phone number ends with '''43<u>21</u>''' then set the port to '''23<u>21</u>'''.  So the command would be '''ssh -L2321:hacweb14:22  ...'''
 +
* Leave the program running (you can minimize it if you like).
 +
 +
=== Step 2:  Tunnel between your machine and '''hacuser@hacweb14''' ===
 +
* Open an new Terminal window
 +
** Windows10:  Type '''command.com''' in the search bar (again) and run the program.  A 2nd black terminal window should appear.
 +
* Run the following command:<br>
 +
'''ssh -p''<port>'' -L5901:localhost:5901 hacuser@localhost'''
 +
* Use the ''hacuser'' password here.
 +
* '''port''' is the number from the previous step.  For example '''2321'''.
 +
* Leave the program running (you can minimize it if you like).
 +
 
= Instructions for Windows =
 
= Instructions for Windows =
 +
 +
'''Note:''' if you are running Windows 10, there is a command-line ssh client included.  I recommend installing a VNC client as noted below, then proceeding to the [[Monitoring_with_VNCViewer_for_Techs#Instructions_for_Linux_.2F_Windows_10|Windows 10 instructions]].
 +
 
== Downloading the Software ==
 
== Downloading the Software ==
 
You'll need two pieces of software:
 
You'll need two pieces of software:
[[Image:puttyvncicons.png|left|UltraVNC and PuTTY icons on the Desktop]]
+
[[Image:puttyvncicons.png|right|VNC and PuTTY icons on the Desktop]]
  
* VNC client (lets you view the remote screen): [http://www.uvnc.com/download/ UltraVNC]
+
* VNC client (lets you view the remote screen).  Either client below should work.
** UltraVNC comes in a zip file. Open it and drag the executable inside to your desktop next to putty.
+
** NOTE: I recommend getting the '''standalone''' version when available.  That way you can run it even if you don't have ''Administrator'' access on your machine.
 +
** [https://www.realvnc.com/en/connect/download/viewer/  RealVNC]
 +
** [https://www.tightvnc.com/download.php TightVNC]
  
* putty (lets the client talk to the remote machine through the firewall):  [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY].
+
* PuTTY (lets the client talk to the remote machine through the firewall):  [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY].
 
** You want to save the '''putty.exe''' to your Desktop.
 
** You want to save the '''putty.exe''' to your Desktop.
 
  
 
== Setting up PuTTY ==
 
== Setting up PuTTY ==
 +
 +
<font color=red>
 +
NOTE: The ''PuTTY'' screenshots below only examples.  Do '''not''' copy them blindly, be sure to read the notes in each section.
 +
</font>
 +
 +
This is a 2-step process.
 +
 +
=== Step 1: Tunnel between your machine and JLab ===
 +
 +
Run '''PuTTY''' and create a ''Step 1'' configuration.
  
 
==== Configure host name of remote machine ====
 
==== Configure host name of remote machine ====
* Fill in the '''Host Name''' and '''Saved Sessions''' field as shown.
+
[[Image:puttystart.png|thumb|PuTTY's connect dialog]]
[[Image:puttystart.png|center|PuTTY's connect dialog]]
+
* Set '''Host Name''' to '''hallgw.jlab.org'''
 +
* Set '''Saved Sessions''' field to '''Step 1'''
 +
<br clear=all>
  
 
==== Configure user name ====
 
==== Configure user name ====
 +
[[Image:puttyconfig2.png|thumb|PuTTY's config, username ]]
 
* Select the '''Data''' entry under '''Connection''' in the left column.   
 
* Select the '''Data''' entry under '''Connection''' in the left column.   
* Fill in the '''Auto-login username''' field.
+
* Set '''Auto-login username''' field to ''your JLab username''.
[[Image:puttyconfig2.png|center|PuTTY's config, username ]]
+
<br clear=all>
  
 
==== Configure tunnel ====
 
==== Configure tunnel ====
 +
[[Image:puttyconfig1.png|thumb|PuTTY's config, Tunnel Config ]]
 
* Click on the '''+''' next to '''SSH''' in the list on the left, then select '''Tunnels'''.   
 
* Click on the '''+''' next to '''SSH''' in the list on the left, then select '''Tunnels'''.   
* Fill in the '''Source port''' and '''Destination''' fields as shown.
+
* Set '''Source port''' to '''2300''' + the last 2 digits of your phone number.
 +
** Note: the '''port''' in this step just needs to be unique for each person connecting.  The 'phone number' thing is just a way to make a number likely to be unique to you.  For example, if your phone number ends with '''43<u>21</u>''' then set the port to '''23<u>21</u>'''
 +
* Set '''Destination''' to '''hacweb14:22'''
 
* <font color=red>''Then click on the '''Add''' button.''</font>
 
* <font color=red>''Then click on the '''Add''' button.''</font>
[[Image:puttyconfig1.png|center|PuTTY's config, Tunnel Config ]]
+
<br clear=all>
  
 
==== Save configuration ====
 
==== Save configuration ====
* Select the '''Session''' entry in the left column (scroll up if you have to), and click on the '''Save''' button.  This will save your settings.
+
[[Image:puttystart.png|thumb|PuTTY's config, main ]]
[[Image:puttystart.png|center|PuTTY's config, main ]]
+
* Select the '''Session''' entry in the left column (scroll up if you have to), and click on the '''Save''' button.  This will save your settings for Step 1.
 +
<br clear=all>
  
==== Open the session ====
+
=== Step 2: Tunnel between your machine and '''hacuser@hacweb14''' ===
* Select '''hacuser@hacweb2''' from the Saved Sessions list and click '''Load'''.
+
* Click on the '''Open''' button at the bottom of the dialog box. A black terminal will open and prompt you for the usual '''hacuser''' password.  Type it in and you should get a normal shell prompt.
+
* You can now minimize this window (<i>do NOT</i> quit PuTTY) and setup UltraVNC.
+
[[Image:puttyshell.png|center|PuTTY's shell ]]
+
  
 +
We will now repeat the above steps to create a ''Step 2'' configuration.
  
== Setting up UltraVNC ==
+
==== Configure host name of remote machine ====
 +
[[Image:puttystart.png|thumb|PuTTY's connect dialog]]
 +
* Set '''Host Name''' to '''localhost'''
 +
* Set '''Port''' to the '''Source port''' you chose in Step 1 above (ie.  '''2321''' in the above example)
 +
* Set '''Saved Sessions''' field to '''Step 2'''
 +
<br clear=all>
 +
 
 +
==== Configure user name ====
 +
[[Image:puttyconfig2.png|thumb|PuTTY's config, username ]]
 +
* Select the '''Data''' entry under '''Connection''' in the left column. 
 +
* Set '''Auto-login username''' field to '''hacuser'''
 +
<br clear=all>
 +
 
 +
==== Configure tunnel ====
 +
[[Image:puttyconfig1.png|thumb|PuTTY's config, Tunnel Config ]]
 +
* Click on the '''+''' next to '''SSH''' in the list on the left, then select '''Tunnels'''. 
 +
* Set '''Source port''' to '''5901'''
 +
* Set '''Destination''' to '''localhost:5901'''
 +
* <font color=red>''Then click on the '''Add''' button.''</font>
 +
NOTE: After clicking '''Add''' you should only see a single line that looks like this in the '''Forwarded ports:''' field.
 +
        L5901    localhost:5901
 +
      If you see a second line, click on it, then click the '''Remove''' button to delete it.
 +
<br clear=all>
 +
 
 +
==== Save configuration ====
 +
[[Image:puttystart.png|thumb|PuTTY's config, main ]]
 +
* Select the '''Session''' entry in the left column (scroll up if you have to), and click on the '''Save''' button.  This will save your settings for Step 2.
 +
<br clear=all>
 +
 
 +
== Setting up the Tunnel using your settings ==
 +
[[Image:puttyshell.png|thumb|PuTTY's shell ]]
 +
* Run PuTTY and select '''Step 1''' from the Saved Sessions list and click '''Load'''.
 +
** Click on the '''Open''' button at the bottom of the dialog box.  A black terminal will open and prompt you to login to the '''hallgw''' machine. 
 +
** You will use ''your'' CUE 2-factor login here.  Type it in and you should get a normal shell prompt like this: '''[<username>@hallgw1]~%'''
 +
** You can now ''minimize'' this window (<i>do NOT</i> quit PuTTY).
 +
* Run PuTTY a 2nd time and select '''Step 2''' from the Saved Sessions list and click '''Load'''.
 +
** Click on the '''Open''' button at the bottom of the dialog box.  A black terminal will open and prompt you to login to the '''hacweb14''' machine.
 +
** You will use the '''hacuser''' password here.  Type it in and you should get a normal shell prompt '''[hacuser@hacweb14]#'''
 +
** You can now ''minimize'' this window (<i>do NOT</i> quit PuTTY) and move on to running the VNC client
 +
<br clear=all>
 +
 
 +
== Running VNC Client ==
 +
 
 +
NOTE: The snapshots below are for an older software called UltraVNC.
 +
  You'll have to find the equivalents in the VNC client you use.
  
 
====  Run '''vncviewer.exe''' ====
 
====  Run '''vncviewer.exe''' ====
 +
[[Image:vncconfig.png|thumb|UltraVNC config window]]
 
* Enter '''localhost:5901''' in the "VNC Server:" field at the top.
 
* Enter '''localhost:5901''' in the "VNC Server:" field at the top.
 
* Enable the '''Save connection settings as default''' at the bottom.
 
* Enable the '''Save connection settings as default''' at the bottom.
[[Image:vncconfig.png|center|UltraVNC config window]]
+
<br clear=all>
  
 
====  Connect to the VNC session ====
 
====  Connect to the VNC session ====
 +
[[Image:vncauth.png|thumb|UltraVNC auth and status windows]]
 
* Click on the Connect button and you should see a couple of windows pop up:
 
* Click on the Connect button and you should see a couple of windows pop up:
 
* Enter the '''hacuser''' password in the appropriate box and hit return.
 
* Enter the '''hacuser''' password in the appropriate box and hit return.
[[Image:vncauth.png|center|UltraVNC auth and status windows]]
+
* You should be rewarded with the hacuser window session.
* You should be rewarded with the hacuser X session.
+
[[Image:vncwindow.png|thumb|UltraVNC Session]]
 
* '''NOTE''': If you get a black screen with yet another password prompt, it means the screen saver software has kicked in.  Just type in the 'hacuser' password again and you'll be good to go.
 
* '''NOTE''': If you get a black screen with yet another password prompt, it means the screen saver software has kicked in.  Just type in the 'hacuser' password again and you'll be good to go.
[[Image:vncwindow.png|center|UltraVNC Session]]
+
<br clear=all>
  
 
====  Quitting the VNC session ====
 
====  Quitting the VNC session ====
* Be sure to close the UltraVNC window, ''not'' one of the windows running
+
* Be sure to close the VNC program window, ''not'' one of the windows running
 
inside the VNC session.
 
inside the VNC session.
 
* Any program/stripchart that you start inside the VNC session will keep
 
* Any program/stripchart that you start inside the VNC session will keep
Line 61: Line 209:
 
anytime from (nearly) any machine.
 
anytime from (nearly) any machine.
  
= Instructions for Linux =
+
== To Summarize ==
 +
 
 +
After setting up the PuTTY configurations, you can do the following:
 +
 
 +
# Run PuTTY, select 'Step 1', and click 'Load', then 'Open', login, then minimize that PuTTY window (leave it running)
 +
# Run PuTTY, select 'Step 2', and click 'Load', then 'Open', login, then minimize that PuTTY window (leave it running)
 +
# Run your VNC Client and Connect (generally it will default to the settings you saved earlier, but you may need to ''load'' a configuration)
 +
 
 +
 
 +
== Running VNC Client ==
 +
 
 +
=== On Windows 10 ===
 +
[[Monitoring_with_VNCViewer_for_Techs#Running_VNC_Client|Use the Windows VNC instructions]]
 +
 
 +
=== On Linux ===
 
* Type the following at a shell prompt (ie. in an xterm)
 
* Type the following at a shell prompt (ie. in an xterm)
   vncviewer -Shared -via hacuser@hacweb2 :1
+
   vncviewer -Shared localhost :1
* When prompted, enter the '''hacuser''' password (twice)
+
* When prompted, enter the '''hacuser''' password.
 
* '''NOTE''': If you get a black screen with yet another password prompt, it means the screen saver software has kicked in.  Just type in the 'hacuser' password again and you'll be good to go.
 
* '''NOTE''': If you get a black screen with yet another password prompt, it means the screen saver software has kicked in.  Just type in the 'hacuser' password again and you'll be good to go.
  
= Setting up the VNC Server =
+
=== On Mac ===
* Log in to hacuser@hacweb2
+
* Start the vncserver by running:
+
  [hacuser@hacweb2]# vncserver -geometry 1600x1100 :1
+
  
= Killing the VNC Server =
+
Simply open Safari and enter “vnc://” followed by the IP Address of the VNC Server, for example: "vnc://localhost:1"
This will quit the server and all applications that were running under that server.
+
'''~ OR ~'''
  [hacuser@hacweb2]# vncserver -kill :1
+
Go to the Finder (ie. click on the desktop), type  ⌘+k, then type in an address like "vnc://localhost:1"

Latest revision as of 23:13, 30 May 2024

Adapting the Connection/Tunnel Instructions for other Hosts

General Users

  • The same instructions can adapted for general users, but you need to make the following substitutions:
   username:  change hacuser to <your CUE username>
   hostname:  change hacweb14 to jlabl5
   gateway:   change hallgw to login.jlab.org

I recommend connecting to a general JLab machine (like jlabl5) and then ssh'ing to a Hall machine or ifarm host from there.

Hall A Techs

  • NOTE: The instructions below use the username and hostname for Hall A.
 username:  hacuser
 hostname:  hacweb14
NOTE: Some of the snapshots use hacweb2 instead of hacweb14.
I think the correct machine these days is hacweb14.  Ask Heidi to be sure.
A proper setup will use only one hacweb machine name.

Hall C Techs

  • The same instructions can be used for Hall C, but you need to make the following substitutions:
   username:  change hacuser to hccuser
   hostname:  change hacweb14 to hccweb1

Hall C Cryo Controls

  • Once you are connected to hccuser@hccweb1 using VNC, then you can access the HMI magnet and cryo controls using the icon in the top toolbar.
    • That icon opens a shared session to the cmagnets@controls8 Windows10 desktop in a new window.
  • If the magnet controls are already running, then the new window should look similar to this.

hccuser@hccweb1 desktop (empty)

  • Otherwise, you will need to run the HMI software using the shortcut on the desktop as noted in the above snapshot. The HMI screen should look something like the snapshot below.

controls8 desktop with HMI software running

VNC Server Management

  • This rarely needs to be done. Once it is started it will stay running even after you disconnect.
    • There is a crontab entry on the hacweb/hccweb machines that should restart the server on a reboot.

Setting up the VNC Server

  • Note the VNC Session ID set up by the :NN option below needs to be unique on the VNC server host. I'm using :1 here, but that may be occupied by another server on other hosts. In that case the vncserver command will fail. Try again with another :NN, where NN is any 1 or 2 digit number until the vncserver report a successful start.
    • If this is done, then you need to make the following changes to the Step 2 tunnel.
      • Replace 5901 with 5900+NN (If NN=13, then use port 5913 instead of port 5901.)
    • Also use that :NN when you run vncviewer
  • Log in to hacuser@hacweb14 (or whatever user@host you want to use, ie. <you>@jlabl5, etc) the way you typically would.
  • If this is the first time you are setting up a VNC server in your account, then you will need to set a password. It doesn't need to be your JLab CUE password... but it's still a password. So be cryptic.
 [user@host]# vncpasswd
  • Start the vncserver by running:
 [user@host]# vncserver -geometry 1900x1100 :1  (where :1 is the VNC session ID)
  • You can now close that window and the VNC server will remain running. Proceed to connect to the VNC server using the instructions below.
NOTE: Some newer versions of TigerVNC will give a warning:
        "WARNING: vncserver has been replaced by a systemd unit unit and is now considered deprecated..."
      Just ignore it.

Killing the VNC Server

This will quit the server and all applications that were running under that server.

 [hacuser@hacweb14]# vncserver -kill :1  (where :1 is the VNC session ID)

Instructions for Linux / Windows 10 / Mac

The ssh configuration for a Mac is done through the Terminal program following the linux instructions.

This is a 2-step process.

Step 1: Tunnel between your machine and JLab

  • Open a Terminal window
    • Windows10: Type command.com in the search bar and run the program. A black terminal window should appear.
  • Run the following command:
ssh -L<port>:hacweb14:22 <username>@hallgw.jlab.org
  • Use your JLab username and your 2-factor password.
  • Replace <port> with 2300 + the last 2 digits of your phone number.
    • Note: the port in this step needs to be unique for each person connecting. The 'phone number' thing is just a way to make a number likely to be unique to you. For example, if your phone number ends with 4321 then set the port to 2321. So the command would be ssh -L2321:hacweb14:22 ...
  • Leave the program running (you can minimize it if you like).

Step 2: Tunnel between your machine and hacuser@hacweb14

  • Open an new Terminal window
    • Windows10: Type command.com in the search bar (again) and run the program. A 2nd black terminal window should appear.
  • Run the following command:
ssh -p<port> -L5901:localhost:5901 hacuser@localhost
  • Use the hacuser password here.
  • port is the number from the previous step. For example 2321.
  • Leave the program running (you can minimize it if you like).

Instructions for Windows

Note: if you are running Windows 10, there is a command-line ssh client included. I recommend installing a VNC client as noted below, then proceeding to the Windows 10 instructions.

Downloading the Software

You'll need two pieces of software:

VNC and PuTTY icons on the Desktop
  • VNC client (lets you view the remote screen). Either client below should work.
    • NOTE: I recommend getting the standalone version when available. That way you can run it even if you don't have Administrator access on your machine.
    • RealVNC
    • TightVNC
  • PuTTY (lets the client talk to the remote machine through the firewall): PuTTY.
    • You want to save the putty.exe to your Desktop.

Setting up PuTTY


NOTE: The PuTTY screenshots below only examples.  Do not copy them blindly, be sure to read the notes in each section.

This is a 2-step process.

Step 1: Tunnel between your machine and JLab

Run PuTTY and create a Step 1 configuration.

Configure host name of remote machine

PuTTY's connect dialog
  • Set Host Name to hallgw.jlab.org
  • Set Saved Sessions field to Step 1


Configure user name

PuTTY's config, username
  • Select the Data entry under Connection in the left column.
  • Set Auto-login username field to your JLab username.


Configure tunnel

PuTTY's config, Tunnel Config
  • Click on the + next to SSH in the list on the left, then select Tunnels.
  • Set Source port to 2300 + the last 2 digits of your phone number.
    • Note: the port in this step just needs to be unique for each person connecting. The 'phone number' thing is just a way to make a number likely to be unique to you. For example, if your phone number ends with 4321 then set the port to 2321
  • Set Destination to hacweb14:22
  • Then click on the Add button.


Save configuration

PuTTY's config, main
  • Select the Session entry in the left column (scroll up if you have to), and click on the Save button. This will save your settings for Step 1.


Step 2: Tunnel between your machine and hacuser@hacweb14

We will now repeat the above steps to create a Step 2 configuration.

Configure host name of remote machine

PuTTY's connect dialog
  • Set Host Name to localhost
  • Set Port to the Source port you chose in Step 1 above (ie. 2321 in the above example)
  • Set Saved Sessions field to Step 2


Configure user name

PuTTY's config, username
  • Select the Data entry under Connection in the left column.
  • Set Auto-login username field to hacuser


Configure tunnel

PuTTY's config, Tunnel Config
  • Click on the + next to SSH in the list on the left, then select Tunnels.
  • Set Source port to 5901
  • Set Destination to localhost:5901
  • Then click on the Add button.
NOTE: After clicking Add you should only see a single line that looks like this in the Forwarded ports: field.
        L5901    localhost:5901
     If you see a second line, click on it, then click the Remove button to delete it.


Save configuration

PuTTY's config, main
  • Select the Session entry in the left column (scroll up if you have to), and click on the Save button. This will save your settings for Step 2.


Setting up the Tunnel using your settings

PuTTY's shell
  • Run PuTTY and select Step 1 from the Saved Sessions list and click Load.
    • Click on the Open button at the bottom of the dialog box. A black terminal will open and prompt you to login to the hallgw machine.
    • You will use your CUE 2-factor login here. Type it in and you should get a normal shell prompt like this: [<username>@hallgw1]~%
    • You can now minimize this window (do NOT quit PuTTY).
  • Run PuTTY a 2nd time and select Step 2 from the Saved Sessions list and click Load.
    • Click on the Open button at the bottom of the dialog box. A black terminal will open and prompt you to login to the hacweb14 machine.
    • You will use the hacuser password here. Type it in and you should get a normal shell prompt [hacuser@hacweb14]#
    • You can now minimize this window (do NOT quit PuTTY) and move on to running the VNC client


Running VNC Client

NOTE: The snapshots below are for an older software called UltraVNC.
  You'll have to find the equivalents in the VNC client you use.

Run vncviewer.exe

UltraVNC config window
  • Enter localhost:5901 in the "VNC Server:" field at the top.
  • Enable the Save connection settings as default at the bottom.


Connect to the VNC session

UltraVNC auth and status windows
  • Click on the Connect button and you should see a couple of windows pop up:
  • Enter the hacuser password in the appropriate box and hit return.
  • You should be rewarded with the hacuser window session.
UltraVNC Session
  • NOTE: If you get a black screen with yet another password prompt, it means the screen saver software has kicked in. Just type in the 'hacuser' password again and you'll be good to go.


Quitting the VNC session

  • Be sure to close the VNC program window, not one of the windows running

inside the VNC session.

  • Any program/stripchart that you start inside the VNC session will keep

running and updating in the background. You can reconnect to the VNC session anytime from (nearly) any machine.

To Summarize

After setting up the PuTTY configurations, you can do the following:

  1. Run PuTTY, select 'Step 1', and click 'Load', then 'Open', login, then minimize that PuTTY window (leave it running)
  2. Run PuTTY, select 'Step 2', and click 'Load', then 'Open', login, then minimize that PuTTY window (leave it running)
  3. Run your VNC Client and Connect (generally it will default to the settings you saved earlier, but you may need to load a configuration)


Running VNC Client

On Windows 10

Use the Windows VNC instructions

On Linux

  • Type the following at a shell prompt (ie. in an xterm)
 vncviewer -Shared localhost :1
  • When prompted, enter the hacuser password.
  • NOTE: If you get a black screen with yet another password prompt, it means the screen saver software has kicked in. Just type in the 'hacuser' password again and you'll be good to go.

On Mac

Simply open Safari and enter “vnc://” followed by the IP Address of the VNC Server, for example: "vnc://localhost:1" ~ OR ~ Go to the Finder (ie. click on the desktop), type ⌘+k, then type in an address like "vnc://localhost:1"