With Launchpad adding hardware-bound tokens this week, here’s the simple version for SSH. With a FIDO2 key, a stolen private key file is useless unless the attacker also has your physical key.
What you need
- A FIDO2 security key and OpenSSH 8.2 or newer on both ends (any current distro).
libfido2installed (on Arch/Omarchy:sudo pacman -S libfido2).
Steps
- Plug in the key and set a PIN if it doesn’t have one yet.
- Make a key that requires touch and PIN:
ssh-keygen -t ed25519-sk -O resident -O verify-required -C "fido2-ssh"
Drop-O residentif you’d rather keep the key handle only on this machine. - Copy the public key to the server:
ssh-copy-id -i ~/.ssh/id_ed25519_sk.pub you@server - Test it. You should get a PIN prompt and the key should blink for a touch.
- Once it works, set
PasswordAuthentication noinsshd_configon the server and reload sshd. Keep a second session open while you test so you don’t lock yourself out. - Register a backup key the same way and store it somewhere safe.
Gotchas
- On a new machine, a resident key can be pulled back down with
ssh-keygen -K. - Automation and bots can’t touch a key, so give them separate, tightly scoped keys instead.
God Bless, and Happy hacking!