Skip to content

SSH keys

Computing resources are accessible through secure connection (SSH) to one of the login nodes. Logging in with SSH client requires a private SSH key.

Important

Please note, that SSH keys are granting just the access to one of the login nodes. You should create your project for running jobs and software compiling (see Get project).

Creating an SSH Key Pair in Linux/UNIX

The authentication using SSH keys is the most secure and flexible approach to ensure a multi-purpose transparent connection to a remote server.

To generate a pair of ED25519 SSH keys execute the following in your terminal:

ssh-keygen -t ed25519 -o -a 100

The following message depicted in Example will show up. Please, just press enter (leave empty line) to keep default values. If you want to specify the directory and desired name of the key, please type the name of the key and directory path.

ssh-keygen command without file name specification

Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/username/.ssh/id_ed25519):

You will be asked to enter passphrase twice. After successful creating of passphrase, your key-pair will be saved to /home/username/.ssh/ under name id_ed25519. The public part of the key pair will have .pub suffix and it is the only one safe to distribute. Please, log-in to registration portal with your crendetials upload your public key file (.pub) to the SSH key section at registration portal.

Ensure the access rights of the generated keys are correct. In particular, the private key should be readable only by you.

Important

The ED25519 algorithm is currently the most recommended public-key algorithm.

Access rights example

ls -l ~/.ssh/id_*
-rw------- guest users ~/.ssh/id_rsa
-rw-r--r-- guest users ~/.ssh/id_rsa.pub
-rw------- guest users ~/.ssh/id_ed25519
-rw-r--r-- guest users ~/.ssh/id_ed25519.pub

Passphrase

To ensure the security of SSH key-pair on your client computer, we strongly encourage you to protect your SSH keys with a passphrase! Note however that while possible, this passphrase is purely private and has a priori nothing to do with your user portal credentials. Nevertheless, a strong passphrase follows the same recommendations as for strong passwords.

Just like encryption keys, passphrases need to be kept safe and protected from unauthorised access. A password management application can help you to store all your passwords safely. There are many free and paid ones you can use, for example: * KeePassX * PWSafe * Dashlane * 1Password * LastPass.

Creating an SSH Key Pair in Windows 10/11

Putty 0.78+ incompatibility

The following procedure does not work with Putty version 0.78 and higher. If users wish to use the SSH key pair in Putty they are advised to create SSH key pair in Putty.

Windows 10 and newer has built-in SSH client. You can use it from command prompt or powershell. Since Windows 10’s April 2018 Update the built-in ssh client is enabled by default. If you have an older version of Windows you can install OpenSSH client or install some of the third-party software (e.g. putty, mobaxterm).

Please, click on a Start icon, type cmd and press enter. Then copy following command to the command line and press enter:

ssh-keygen -t ed25519 -o -a 100

The following message depicted in Example will show up. Please, just press ENTER (leave empty line) to keep default values. If you want to specify the directory and desired name of the key, please type the name of the key and directory path.

ssh-keygen command without file name specification

Microsoft Windows [Version 10.0.19044.2846]
(c) Microsoft Corporation. All rights reserved.

C:\Users\username>ssh-keygen -t ed25519 -o -a 100
Generating public/private ed25519 key pair.
Enter file in which to save the key (C:\Users\username/.ssh/id_ed25519):

You will be asked to enter passphrase twice. After successful creating of passphrase, your key-pair will be saved to C:\Users\username/.ssh/ under name id_ed25519. The public part of the key pair will have .pub suffix and it is the only one safe to distribute. Please, log-in to registration portal with your crendetials upload your public key file (.pub) to the SSH key section at registration portal.

Creating SSH key pair in PuTTY (Windows 8 and older)

The following procedure uses PuTTY, an open-source SSH client. You will also need PuTTYgen, which you can download from here.

  1. Start PuTTYgen.

  2. Select EdDSA with 255 bits in the Parameters section.

  3. Click Generate and move your mouse in the grey box to generate randomness.

  4. Choose a strong password for the key, then click Save private key to save the private key.

  5. Copy the text from the grey box at the top of the PuTTY Key Generator.

  6. Save it as a separate file (e.g., id_eddsa_devana.pub) to use as your public key.

  7. Upload your public key to the SSH key section.

Created by: marek.steklac