Yubikey distribute u2f_keys

283 views Asked by At

I managed to configure my desktop to use my yubikey for login according to this manual: https://support.yubico.com/hc/en-us/articles/360016649099-Ubuntu-Linux-Login-Guide-U2F

Now I copied the generated u2f_keys on an other machine to ~/.config/Yubico.

But the login does not work on the other machine with the same Yubikey plugged in. auth.log says:

Device for this keyhandle is not present

Same error if I create a new u2f_keys file by:

pamu2fcfg -N > ~/.config/Yubico/u2f_keys
  1. is the u2f_keys file not intended to be distributed?
  2. is it save to publish this file on a public git repo?
1

There are 1 answers

0
Tom B On

pamu2fcfg -N > ~/.config/Yubico/u2f_keys should be issued without -N to create a new file, the -N is used like this to add additional keys to the keyfile for the SAME user

pamu2fcfg -N >> ~/.config/Yubico/u2f_keys

Note the >> used to append the data to the line created when not using -N

-N does not put your Userid in the file