[tutorial]🔑 Create and register an SSH key to access HPC clusters

To access HPC clusters (Baobab, Yggdrasil, Bamboo), you must use a modern SSH key, ideally ED25519, protected by a passphrase.


:white_check_mark: Requirements

  • Use a modern key type (ED25519 recommended)
  • A passphrase is mandatory
  • The public key must be added to your UNIGE user profile

:penguin::red_apple: 1. Linux / macOS (native tools)

:locked_with_key: Generate an SSH key

Open a terminal and run:

ssh-keygen -t ed25519 -C "your.email@unige.ch"

Steps

  • Press Enter to accept the default path
  • Enter a passphrase and confirm it

:open_file_folder: Generated files

* ~/.ssh/id_ed25519 → private key (keep it secret)
* ~/.ssh/id_ed25519.pub → public key

:window: 2. Windows (PuTTY / Pageant / PuTTYgen)

:downwards_button: Install tools

Download here Putty, PuttyGen and Pageant:
Download PuTTY tools


:locked_with_key: Generate a key with PuTTYgen

Steps

  1. Select Ed25519 (recommended modern format)
  2. Click Generate and move the mouse
  3. Enter a passphrase and confirm it
  4. Click Save private key (file will be .ppk)
  5. Copy the public key from the top field

:white_check_mark: Copy the entire line (starting with ssh-ed25519)


:warning: Important: key format

  • The private key generated by PuTTYgen is in PPK format
  • This format is specific to PuTTY / Pageant

If you need to use the key with other tools (ssh, scp, rsync, Linux/macOS):

  • In PuTTYgen: Conversions → Export OpenSSH key

:magnifying_glass_tilted_right: 3. Retrieve your public key

Linux / macOS

Run:

cat ~/.ssh/id_ed25519.pub

Windows

Copy the public key directly from PuTTYgen.

:white_check_mark: Make sure to copy the full line


:outbox_tray: 4. Add your public key to your UNIGE profile

UNIGE account

Access MyAccount UNIGE


External users

Update your outsider profile


:repeat_button: 5. Use an SSH agent (strongly recommended)

Without an agent, you will need to enter your passphrase every time.

Using an SSH agent allows you to authenticate once per session.


:penguin::red_apple: Linux / macOS

Run:

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

:window: Windows (Pageant)

  • Launch Pageant
  • Load your .ppk key
  • Enter your passphrase once per session

PuTTY will automatically use the key via the agent.


:compass: Connection issues

See the troubleshooting guide:
SSH login troubleshooting – key mismatch

You can also ask questions on the
HPC community forum


:electric_plug: 6. Test your connection

Linux, Mac, ssh

ssh username@cluster.unige.ch

Putty

If you are using Putty without an agent, you need to add your key to the session parameter in putty prior to connect.


:white_check_mark: Summary

  1. Generate a modern SSH key (ED25519 recommended) with passphrase
  2. Retrieve the public key
  3. Add it to your UNIGE profile
  4. Use an SSH agent for convenience