>_ IzzyLab

Hands-on task

This task is step 1 of the course “SSH: keys and access”

Generate an SSH Key

easy~3 min

Create an ed25519 SSH key pair with no passphrase in the file /root/.ssh/id_ed25519 (the public key /root/.ssh/id_ed25519.pub should appear alongside it).

What you'll practise:
  • ssh-keygen
  • ed25519
  • key pairs
  • passphrase

Topic breakdown

SSH's asymmetric cryptography is built on a key pair: the private key is kept by the owner, the public key is handed out to servers. Such a pair is generated by the ssh-keygen utility, where the algorithm type is chosen with the -t option (the modern, compact option is ed25519), and the path to the private file with the -f option; the public key is placed alongside by the utility itself, appending the .pub suffix. By default ssh-keygen asks for a passphrase interactively — to make the key come out without one and without prompts, the passphrase value is set to empty via a separate option (see -N in man ssh-keygen).

What's checked

  1. key pair created
  2. key type is ed25519
  3. the key has no passphrase

What it looks like