Skip to content

Save SSH User Certificate on Yubikey #1205

Answered by maraino
Duck-dave asked this question in Q&A
Discussion options

You must be logged in to vote

AFAIK an SSH certificate cannot be stored in a YubiKey. But you can sign a certificate for an ecdsa-sk or ed25519-sk key that require the YubiKey present. This is how:

  1. Create your choice of sk key, with a YubiKey present, you will need to touch it:
ssh-keygen -t ed25519-sk
  1. Sign the public key with the CA, it will create ~/.ssh/id_ed25519_sk-cert.pub:
step ssh certificate --sign [email protected] ~/.ssh/id_ed25519_sk.pub
  1. Assuming the SSH server is configured with the valid TrustedUserCAKeys and the certificate has a valid principal, just:
ssh [email protected]
# OR 
ssh -i ~/.ssh/id_ed25519_sk [email protected]

You must provide the password (if any) and touch the YubiKey to log in.

You can also…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Duck-dave
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by tashian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants