UserAccess

From NJIT-ARCS HPC Wiki
Jump to: navigation, search

This page provides information on methods of connecting to NJIT's HPC hosts from Linux, MacOS, and Windows platforms.

Getting a Login

Faculty can obtain a login to NJIT's HPC & BD systems by sending an email to hpc@njit.edu. Students can obtain a login either by taking a class that uses one of the systems or by asking their faculty adviser to email hpc@njit.edu on their behalf. Your login and password are the same as for any NJIT AFS system.

Secure Shell (SSH)

You must be on the NJIT network (this includes VPN) to ssh directly into the headnode of an HPC cluster.

If you are outside of the NJIT network, you can ssh into afsconnect1.njit.edu or afsconnect2.njit.edu, and from there ssh into the headnode of an HPC cluster.

Linux and MacOS

Linux

There are different methods to open a terminal window on the various Linux distributions. Search the web for instructions specific to the distribution you are using. Once a terminal window is opened, enter :

 localhost> ssh -X -Y ucid@HPC_HOST.njit.edu 

You will be prompted for your password. Enter your AFS password. You can omit the -X -Y if you are not using a graphic interface. Substitute "lochness" or "Stheno" for "HPC_HOST".

MacOS

Open a Terminal window. Applications -> Utilities -> Terminal

At the terminal prompt enter :

 localhost> ssh -X -Y ucid@HPC_HOST.njit.edu 

You will be prompted for your password. Enter your AFS password. You can omit the -X -Y if you are not using a graphic interface. Substitute "lochness" or "Stheno" for "HPC_HOST".

Windows

A free Secure Shell client can be obtained from the MobaXterm Site. In addition to SSH, MobaXterm provides an X windows server, VNC client and other useful utilities. Download, install, and open MobaXterm.

MobaXterm.open.png

Select Start local terminal to open the terminal. At the terminal prompt enter :

 ssh -X -Y ucid@HPC_HOST.njit.edu 

MobaXterm.ssh.initial.png

You will be prompted your your password. Enter your AFS password. You can omit the -X -Y if not using a graphical interface on Lochness. Substitute "lochness" or "Stheno" for "HPC_HOST".

Virtual Network Computing (VNC)

VNC software creates an image of a remote host's desktop on the user's local workstation or laptop, permitting access to the remote host with a graphical user interface (GUI).

Using VNC, it is possible to use a GUI environment from a remote host as if you were at the console of that host. In addition, it is also possible to start long-running jobs, and then disconnect without your jobs terminating.

Establish a VNC Server Session on an HPC host

  • Using the SSH client on your local workstation or laptop, log onto an HPC host.
  • Run krenew with the arguments below to maintain your Kerberos and AFS credentials
  • Establish the VNC environment and set a VNC session password.
    • Enter vncserver. You will be prompted for a password, and then a session will be started.
hpc-host-NM ucid>: krenew -t -b -K 60
hpc-host-NM ucid>: vncserver
You will require a password to access your desktops.
Password:
Verify:

New 'hpc-host:8 (username)' desktop is hpc-host:8

Creating default startup script /home/ucid/.vnc/xstartup
Starting applications specified in /home/ucid/.vnc/xstartup
Log file is /home/ucid/.vnc/hpc-host:8.log
  • Note and record your assigned VNC Server desktop number.
  • This VNC session will continue to run unless the process is terminated either by the user terminating the process, or by a host reboot or other abnormal

operation. Do not start more than one VNC Server session.

  • Note that if the system is rebooted or your VNC session is otherwise terminated you will need to establish a new session. VNC sessions are stateless,

which means that desktop numbers are not preserved across logins. You will get a new new desktop number at the next login.

  • Unless you alter the files created by the VNC server, you will not be asked to set a password again.

Connecting to an established VNC Server Session on an HPC host

Independent of the operating system on your workstation or laptop, the best way to connect to an established VNC Server session is through an SSH "tunnel". Connecting to an established VNC server session will require both an SSH client and a VNC client.

Linux and MacOS

Using the SSH client on the local computer create an SSH tunnel between the local computer and the hpc-host. The command is

ssh -L <local-port>:localhost:<remote-port> ucid@hpc-host.njit.edu

The local port should be set to 5900 and the remote port is 5900 + (the desktop number assigned when the VNC session was established.)

localhost> ssh -L 5900:localhost:5901 ucid@hpc-host.
Linux

After the SSH tunnel is created, open a terminal and enter vncviewer localhost. A window will appear and you will be prompted for a password. Enter the password created when the VNC session was established.

localhost> vncviewer localhost 

VNC Authentication VncAuth .png

You are now connected to your VNC session.

MacOS

There are several VNC clients available for Mac. This example will use TigerVNC. Download and install TigerVNC according to the instructions.

After the SSH tunnel is created, open TigerVNC.

Application -> TigerVNC Viewer 1.3.0

Enter "localhost" for the VNC viewer.

VNC Viewer Connection Details.png

Click "Connect". A new window will appear prompting for a password. Enter the password created when the VNC session was established. Click 'OK.'

File:VNC authentication.png

You are now connected to your VNC session.

Windows

MobXterm can be used as both an SSH and VNC client.

Select 'New Session.' 100px

Choose "VNC" and click "OK"

100px

Enter the hostname that the VNC server is established on. The Port number is : 5900 + (the desktop number obtained when the VNC session was established). Select "Connect through SSH gateway (jump host)". Enter the hostname that the VNC server is established on for the "Gateway SSH server", 22 for the "Port", and your UCID for "User". Click "OK".

100px

The first password prompt will be for the SSH tunnel. Enter your AFS password.

100px

The second password will be for "vncuser on localhost". Enter the password created when the VNC session was established.

100px

You are now connected to you VNC session.

100px

Ending a VNC Server session

  • Using ssh from your local workstation or laptop, log on to the HPC host where the vncserver is running.
  • Enter vncserver -kill <desktop number> Where <desktop number> is the desktop number assigned when the VNC Server Session was established.
hpc-host-NM ucid>: vncserver -kill :8
Killing Xvnc process ID 31460