Connect to the cluster (SSH)

An HPC cluster is a big computing infrastructure intended for concurrent usage by many users. A desktop, laptop, or even workstation is intended for a single user at a time. Graphic User Interfaces (GUI) generally consume computing resources even when the user is not using them. That is one of the reasons why it is common practice in HPC clusters to only allow remote shell access and limited capabilities for GUI applications.

Due to security reasons, HPC clusters are intended to be accessed using a secure shell. Nowadays, SSH is the standard secure shell. Secure Shell (SSH) is a cryptographic protocol for securely operating network services over an unsecured network such as the Internet. The typical application of SSH in HPC is to provide remote command-line login and remote command execution.

To connect to any of our clusters, you need a username and your name as a cluster user. You should have obtained that username with your WVU Login account

WVU’s clusters are also open to users currently associated with another higher education institution in West Virginia. These users will still need a WVU Login account to access it. If you are working with someone (i.e., a PI) at WVU and need access, please have that person complete the form located here. If you are not working with anyone at WVU, please contact WVU Research Computing - HPC HelpDesk The requestor must be on the campus network or using WVU’s VPN for this request to work.

The next step is to use an SSH client to connect to one of our clusters.

Get an SSH Client

An SSH client is software that allows you to run a remote session on a computer over a network using a secure connection based on the SSH protocol.

An SSH client usually comes installed on MacOS and most Unix/Linux distributions, so if you are using one of those operating systems, you do not need to install anything.

Windows users will have to acquire an SSH client. PuTTY is a free SSH implementation for Windows platforms. It comes with an xterm terminal emulator.

Go to PuTTy to know more about the product or download it directly from PuTTY Download.

PuTTY is not the only SSH client available for Windows. See, for example, Comparison of SSH clients for several alternatives.

Connecting to WVU’s Clusters via SSH

Currently, WVU has two clusters available for access. The instructions for connecting slightly differ depending on which cluster you are using.

General SSH Connection Instructions

On MacOS and Unix/Linux, open a terminal shell and type:

$> ssh <username>@<hostname>

or:

$> ssh -X <username>@<hostname>

Where <username> is your WVU Login account username and <hostname> is the name of the cluster you wish to connect to. The -X option forwards XWindow applications running on the server to your local machine. Remember that the $> symbols above indicate a command on the terminal; you should not enter those initial characters.

We currently have two clusters Thorny Flat and *Spruce Knob the hostnames are:

WVU’s High-Performance Computer (HPC) Clusters

Cluster

Hostname

Status

Spruce Knob

spruce.hpc.wvu.edu

Operational

Thorny Flat

tf.hpc.wvu.edu

Operational

Spruce Knob Connectivity Instructions

To connect to Spruce Knob use the following command:

$ ssh <username>@spruce.hpc.wvu.edu

Note: Two-factor authentication is required to connect to Spruce Knob when not on WVU’s Main Campus Network. More about WVU’s Two-Factor Authentication system can be found here

Thorny Flat Connectivity Instructions

To connect to Thorny Flat, you must first connect to WVU’s SSH gateway server. This gateway server will allow you to connect the Thorny Flat, which is hosted at the Pittsburgh Supercomputing Center.:

$ ssh <username>@ssh.wvu.edu

More information on WVU’s Gateway Service can be found here. When your account is created for Thorny Flat, you will automatically be approved to access WVU’s SSH Gateway Service.

Note: Two-factor authentication is required to connect to WVU’s Gateway Service. More about WVU’s Two-Factor Authentication system can be found here.

then:

$ ssh tf.hpc.wvu.edu

Note

You cannot connect directly to Thorny Flat via SSH. Executing directly from your terminal or SSH client ssh tf.hpc.wvu.edu will always fail.

Logging In

When your SSH access is granted, you will be prompted with a login message with helpful commands and updates about the cluster.

At this point, you will get a terminal prompt such as:

<username>@srih0001:~$

All the commands executed from now on are happening on a remote machine, the Spruce Knob head node, this is the place where most of your direct interaction with the cluster happens.

Logging Out

Logging out of a cluster can be done with the exit command:

$> exit

The exit command will attempt to terminate any process running on the head. Sometimes, you will get an error that jobs are running or stopped. You can view stopped jobs using the jobs command:

$> jobs -l
[1]+ 3325 Stopped            vim script56.py

The output of jobs -l will give you the job PID number (in this case, 3325) and the command (vim script56.py). To kill jobs preventing successful logout, use the kill command:

$> kill -s 9 3325

Once all jobs are terminated, the exit command will close the connection to the host. In section Workload Manager (SLURM), we will explain how to submit jobs on the queue system. Jobs on the queue system are not killed when you log out of the head node.

Putty Example

If you are using Windows and PuTTy, click on PuTTy Icon and enter the hostname.

../_images/puttystartup.png

If you want to enable X11 forwarding, i.e., remote windows popping up on your local machine, follow the steps below to enable X11 forwarding.

../_images/putty_xforward.png