>_ IzzyLab

Hands-on task

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

Key with a comment

easy~3 min

Generate an ed25519 key at /root/.ssh/deploy with no passphrase and with the comment deploy@ci — the comment makes it easy to identify the key among others later.

What you'll practise:
  • ssh-keygen
  • -C
  • key comment
  • ed25519
  • key identification

Topic breakdown

An SSH key comment is an arbitrary label at the end of a public key that helps identify it (by default user@host). It is set at generation time with -C, and on an existing key you can change it with ssh-keygen -c -C 'new' -f key. In a server's authorized_keys, where there are many keys, meaningful comments (deploy@ci, laptop-2024) are critical for auditing: they tell you whose access it is and whether it can be revoked. The comment does not affect the cryptography, only how convenient the key is to manage.

What's checked

  1. key created
  2. type ed25519
  3. no passphrase
  4. comment deploy@ci

What it looks like