SCIAMA

High Performance Compute Cluster

Menu
  • Home
  • Getting Started
    • How to get an account
    • How to Log in
    • Log in from Windows
    • Using X2Go
    • Create an SSH key pair
    • SSH Fingerprints
    • Using SSH keys
    • Training Exercises
    • Slurm MPI Batch Script
  • Using SCIAMA
    • Using Jupyter Notebooks
    • Using JupyterHub
    • Using Spyder
    • Storage Policy
    • Submitting jobs
    • Using GPUs
    • Using Matlab
    • Using Conda Environments
    • SLURM for PBS Users
    • File transfers
    • GitHub/BitBucket
    • Cloud Backup
    • Reserving Compute Nodes
    • Acknowledging SCIAMA
  • Resources
    • Hardware
    • Queues
    • Software
      • Using Software Modules
      • Changing Default Modules
      • Mixing MPI and OpenMP
      • Using CONDA
  • System Status
    • Core Usage
    • Disk Usage
    • Users Logged In
    • Jobs Status
    • Jobs by Group
    • Node Status
    • SCIAMA Grafana Dashboard
    • Maintenance and Outages
  • Contact Us

How to use SSH Keys on SCIAMA

Creating SSH key pairs

Please check out the related article HERE on how to create a new SSH key pair on various operating systems.

Copying/Installing keys onto SCIAMA (with access)

These instructions are for users with working access to SCIAMA (e.g. via training account with password or via another private/public key pair). All other SCIAMA users have to send their new public ssh key attached as a file (not copy & pasted) by email to the SCIAMA support. Non-local users may be asked to provide further proof of their identity.

Now that you have created a private and public key you need to copy the public key onto Sciama using your existing access. Use the command :

scp <path to your pub key> <username>@login4.sciama.icg.port.ac.uk:~/new_key.pub
ssh <username>@login4.sciama.icg.port.ac.uk 'cat ~/new_key.pub >> .ssh/authorized_keys'

You should see output similar to if you log into this login node for the first time:

The authenticity of host ‘login4.sciama.icg.port.ac.uk (148.197.10.71)’ can’t be established.
RSA key fingerprint is SHA256:zELprgvBZmyQRQ5/6/a58e3e660bR3lJZItu18pnZcg.
Are you sure you want to continue connecting (yes/no)? yes

Now try logging into the machine, with:

ssh <username>@login4.sciama.icg.port.ac.uk

You will be prompted for your pass phrase:

Enter passphrase for key ‘$HOME/.ssh/id_rsa’:
Last login: Sat Apr 28 17:28:18 2018 from host.somewhere
and check to make sure that only the key(s) you wanted were added to your authorized_keys file in your $HOME/.ssh folder on the TARGET machine i.e. in this case the login server:

cat $HOME/.ssh/authorized_keys
In the output, you should find all the public keys of the rsa keys you added (plus in case of SCIAMA one Alces public key needed for maintenance). You can compare them with the content of the $HOME/.ssh/id_rsa.pub file on the machines you log in from.

Now try logging in using your new key … you should now be asked for your passphrase and then successfully being logged in.

Using SSH key agents

If you don’t want to enter the passphrase each time you can start an ssh agent that will do it for you. As an example, on your Linux desktop:

eval ‘ssh-agent bash’
ssh-add
Enter passphrase for $HOME/.ssh/id_rsa:

Every time the agent is restarted (e.g. after a reboot) the keys will need to be re-added.

Other operating systems also provide similar key management software (e.g. PuTTY’s pageant tool).

Top of Page

Copyright © 2022 ICG, University of Portsmouth