10

I am running into an issue in adding my .pem key to my ssh-agent. I have set up my Linux Ubuntu 20.04 system with Yubikey and it has worked great. Have not had any problems using my Yubikeys. Love the added security; however, when I run this specific command ssh-add -K I get this message Enter PIN for authenticator:. I typed in my pin number from my authenticator for GitHub and even pressed on my YubiKey but nothing processed through. Can anyone help me on this? I would greatly appreciate it.

Roma
  • 535
  • 6
  • 18

1 Answers1

27

In the Apple version -K stores the password in your keychain, so you don't have to type it every time. In the non-Apple version -K "Loads resident keys from a FIDO authenticator".

So, Instead of writing

$ ssh-add -K ~/.ssh/private_key


write this :

$ ssh-add ~/.ssh/private_key 

Replace private_key as your key e.g. $ ssh-add ~/.ssh/id_rsa

  • 2
    heads up, using macos 10.15 here. if i use the `-K` switch with `ssh-add` it prompts me for a _PIN_ which i did not setup with this particular key that i'm attempting to add to my ssh-agent, so dropping the `-K` switch will prompt me for my passphrase. – ipatch Feb 16 '22 at 19:38