Hands-on task
Generate an SSH Key
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).
- ssh-keygen
- ed25519
- key pairs
- passphrase
Hands-on task
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).
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).