Skip to content

SSH

SSH is an essential tool for interacting with HPCs.

Linux or macOS users can use the Terminal. Windows users can use the Command Prompt.

Log in to the Sulis HPC:

ssh username@login.sulis.ac.uk

To have easier access to the HPC, we can create a config file at ~/.ssh/ with the following content by typing vi ~/.ssh/config in the terminal. Then we can just type ssh sulis to log in to Sulis, and use sulis for transferring files, as detailed below.

Host sulis
    HostName login.sulis.ac.uk
    User ab123
    PubKeyAuthentication yes
    IdentityFile ~/.ssh/sulis

Host office
    HostName nyx.mcs.le.ac.uk
    User ab123

PubKeyAuthentication yes in the sample means the server can be accessed using your public SSH key (you need to copy your public SSH key to the server before using this).

An SSH key can be generated by typing ssh-keygen in the terminal. Then you need to copy your public SSH key to the server by typing ssh-copy-id -i /path-to-key/key.pub sulis. More details on this can be found here and here. By the way, when generating an SSH key for Sulis, it must have a passphrase and should be used exclusively for Sulis, according to here. We need to upload the public key to Sulis via here instead of using the ssh-copy-id command.

We don't want to type the passphrase every time we log in to Sulis. A way to remember the passphrase is mentioned here.

IdentityFile ~/.ssh/sulis indicates the private key to use for authentication. If you cannot log in with your SSH key, try setting up the config file as in the sample above to explicitly point to the private SSH key, and try again.

Typing at a local terminal when transferring a file from local to the HPC:

scp -r destination-folder/ sulis:path-to-file/file

or transferring a file from the HPC to local:

scp -r sulis:path-to-file/file destination-folder/

The flag -r is required when transferring a folder.

Access to Sulis from off campus: SSH to your Linux account at the UoL by typing ssh username@nyx.mcs.le.ac.uk, then SSH to Sulis from there.