I deleted all my SSH keys
The author has used ed25519-sk[1] keys on YubiKeys since they became available, but a few traditional key files were still on disk. The post describes how to move all SSH keys into hardware secure enclaves so that no unprotected key material stays on disk. The author says a passphrase is probably enough for most threat models, but prefers hardware-backed keys, which cannot be used without the device. He plans to test three options: YubiKey, TPM[2] and Apple Secure Enclave[3].
With a YubiKey, a key is created with ssh-keygen -t ed25519-sk and the -O resident option. The file left on disk is only a handle to the key on the device, not the key itself. A key created with -O no-touch-required can be used unattended, but anyone with access to it can then use it without a physical confirmation.
The TPM method needs the ssh-tpm-agent package, a small Go package that Ubuntu ships natively. The TPM-backed private key is stored on disk as a .tpm file. The author notes that ssh-tpm-agent does not check the Platform Configuration Registers, so changes to hardware, firmware or the OS will not stop the key from being unsealed.
Read the original blog.infected.systemsDiscussion
Discussion
Commenters mostly suggest alternatives: KeePassXC and other password managers that can act as an SSH agent, and GnuPG or PIV on a YubiKey. Some say older distributions and network appliances do not accept ed25519-sk keys. One commenter asks what the practical difference is between a key created with -O resident and -O no-touch-required and a plain ed25519-sk key, and no answer is given in the comments.
Sources
-
blog.infected.systems
I deleted all my SSH keys
-
KRGeekNews KO
내 SSH 키를 모두 삭제했다

