How do I generate SSH keys inside my yubikey, on Ubuntu?
There seems to be nowhere to look for this info.
Information Security Stack Exchange is a question and answer site for information security professionals. It only takes a minute to sign up.
Sign up to join this communityHow do I generate SSH keys inside my yubikey, on Ubuntu?
There seems to be nowhere to look for this info.
I asked the question verbatim on reddit r/yubikey and got the following answer, along with another with some reference to gpg.
ssh-keygen -t ed25519-sk -O resident # resident means, that the key will be generated on the yubikey
It produce the following output:
user@pc:~$ ssh-keygen -t ed25519-sk -O resident
Generating public/private ed25519-sk key pair.
You may need to touch your authenticator to authorize key generation.
Enter PIN for authenticator:
Enter file in which to save the key (/home/user/.ssh/id_ed25519_sk):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user/.ssh/id_ed25519_sk
Your public key has been saved in /home/user/.ssh/id_ed25519_sk.pub
The key fingerprint is: SHA256:ztpJ8rTSlo07BQ0LyL6hI2X9/CE9fTdy0EQZhAnxc74 user@pc
https://www.reddit.com/r/yubikey/comments/tzfgas/generating_key_inside_yubikey/
Enter file in which to save the key (/home/user/.ssh/id_ed25519_sk):
wouldn't it generate in the local OS?
Apr 9, 2022 at 2:44
Type the following commands on the command line:
gpg --edit-card
admin
generate