The Braindump Blog

Setting up Yubikeys in Linux

· Braindump

As my digital paranoia contiues to increase, I’ve gone the way of the physical secuity key for some critical online accounts. Setting it up in Linux wasn’t hard at all, but it also wasn’t just plug and play.

Yubikey’s recommendation is do install its authenticator app but I didn’t really want that overhead. This is what worked for me in Linux Mint’s terminal:

1. Install the software:

sudo apt update
sudo apt install yubikey-manager

# I'm not certain next 2 are required, especially if you either have the "security" version of the key or have this software already installed and running...but if the rest doesn't work!
sudo apt install pcscd
sudo systemctl enable --now pcscd

2. Set up your keys:

Plug the key in then:

ykman info ## will show you if the key is recognised and working, its serial number etc.

ykman fido info # gives you info regarding the key's FIDO capability which is what I was most interested in using. Including whether a PIN is set (default = no)

ykman fido access change-pin # To add / change the PIN if you want one

ykman fido access verify-pin # Best to double check the PIN works before proceeding and risking locking yourself out of everything

Step 3 is then going to be to set up your now-working keys with whatever sites and apps you want to use them with.

Remember, always buy at least two if you’re going full-key-security! Otherwise if one breaks you might find yourself a bit stuck.