We use cookies to ensure that we give you the best experience on our website. You can change your cookie settings at any time. Otherwise, we'll assume you're OK to continue.

Durham University


Connecting to COSMA

COSMA has 8 login servers, two for COSMA5, one for COSMA6, three for COSMA7, and two for COSMA8. To connect to COSMA, you will need an SSH key pair:

  1. Run the ssh-keygen command.
  2. This will prompt for the filename to save the key as. If you do not already have a key, you can use the default, otherwise, perhaps something like id_rsa_cosma.
  3. It will also prompt for a passphrase required to unlock your key. Please use something secure here.
  4. You can then upload the public part of your ssh key (e.g. to SAFE.

A single SSH keypair will be able to connect to all login nodes. Please note that each login node has a separate fingerprint, which will cause a warning and prompt you to accept it the first time you try to log in.

The same SSH keypair can also be used for git access (for example, see this guide for GitHub). Though do make sure that you do not share your private key with anyone, and do not reuse it on different computers.

Logging in with SSH

If you have done that already, use SSH to connect:

ssh USER@login[5,6,7,8] e.g. ssh

where USER is your COSMA username. This will log you in via a secure shell to COSMA (if you don't specify a number, you will arrive at COSMA5). You can also login to a different machine by specifying a different login node:

  • for COSMA8
  • for COSMA7
  • for COSMA6
  • for COSMA5
  • login5a/5b/6a/7a/7b/7c/8a/ for a specific login node (e.g. login7a)
  • etc.

The login systems are also the developing nodes: so they know about the compilers, have access to modules, and the batch system. Unless otherwise specified, all of your interactive work should be done on the login nodes. For instructions on how to submit jobs to the batch quees, see

Running programmes with graphical interface

If you wish to open a graphical programme on a login node (i.e. to view a gnuplot/matplotlib window, open a PDF in an evince viewer or a picture in eog, view an HDF5 file in hdfviewer, etc.), then using an x2go client is the preferred option, please see our help pages. Alternatively, you can add a -X flag to forward the X server:

ssh -X

You should then be able to have programmes forwarded to your local X server. For instance, typing

eog PICTURE.png

on a COSMA login node will open the file.

This should works out of the box on most Linux / BSD systems. If you are using macOS, you will need to install XQuartz on your machine.

If you are doing a lot of graphical work, you may find x2go is easier to use.

Saving SSH Configuration

To save yourself from typing the full command every time, you can save your SSH configuration in a ~/.ssh/config file on your local machine. For instance, if your configuration file looks like this:

Host cosma
  User USER
  IdentityFile ~/.ssh/id_rsa
  ForwardX11 yes


ssh cosma

will be equivalent to

ssh -X

To learn about more advanced options, please refer to the manual: man 5 ssh_config.

Disk Usage

Your home quota is usually 10 GB. The contents of your $HOME are backed up every night, and should only be used for code and small datasets that are not easily recoverable.

All generated/large datasets should be stored in a separate space, located in /cosma[5678]/data/project_name/USER. Your quota there is more generous and is currently set by default to 10 TB.

COSMA8 / COSMA7 / COSMA[5,6] Differences

Due to differences in CPU architecture between COSMA5, 6, 7, and 8 code compiled with strong optimisation on the COSMA7 login nodes may not work on the COSMA5, 6 or 8 nodes, and code compiled on COSMA8 may not work on COSMA5 or 6, throwing illegal instructions errors. Therefore, please try to use the login nodes associated with the system to which you are submitting jobs, for your compilations. Alternatively, add a recompilation step as part of your job submission script.

COSMA logo