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
- is the u2f_keys file not intended to be distributed?
- is it save to publish this file on a public git repo?
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