I use gpg --export-ssh-key to generate a public RSA key I can add to my authorized_keys file for the purposes of accessing my server via SSH. I have two Yubikeys (Yubikey 5 NFC) with the same subkeys on each of them. Ideally I want each Yubikey to have their own subkeys instead of sharing one. If I do this, will the same exported SSH key work with multiple subkeys? My concern is, if I lose one Yubikey, can I still log into my server using the backup Yubikey, even though I generated unique subkeys for them with the same master key?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.