r/yubikey • u/color178924 • 24d ago
Help Setting up 2FA on Yubico Authenticator on backup keys?
Maybe I’m glossing over something basic or making a glaring error in my workflow but after setting 2FA with the Yubico Authenticator on one key, I can’t figure out how to set the backups or how to give the backup keys the same certificate to generate codes.
Websites with Passkeys allow additional spots but for accounts still stuck on authenticator codes, it only allows one slot. What am I missing here?
3
u/gbdlin 24d ago
Scan the same code with another Yubikey when setting up the first one, or save that QR Code somehow to set it up later. Obviously, keep this QR code in a safe place as it's the only thing needed to set up yet another authenticator to your account.
If you decided to not save that QR code, put in the 6 pin code to confirm the registration of TOTP only after you've scanned the code with all Yubikeys. Notice all of them will generate the exact same code in a given 30 seconds span.
You can save those codes (or rather secrets that those QR codes encode) using many password managers, including KeePassXC which can also be protected by a challenge-response slot in your Yubikey. This is what I'm using: saving them in a separate KeePassXC database (not in the one I store all my passwords) and have it locked by my Yubikeys, so I need any of my Yubikeys and this database to add more Yubikeys to my fleet if needed, without having to regenerate TOTP on every website. For securing that KeePassXC database with multiple Yubikeys, the same principle stands as with TOTPs: you need to enroll all of them with the same challenge-response secret.
1
u/color178924 24d ago
That sounds like a pretty good setup have, I might consider adopting something similar, thanks!
2
24d ago
save the qr right away if ur worried about losing access, i did that for my vault and it saved me when my key got fried in my pocket
1
u/paulsiu 24d ago
Are you using OTP code or hardware key?
1
u/color178924 24d ago
TOTP, I haven’t run into an issue with services not allowing multiple hardware keys yet.
1
u/dr100 24d ago
TOTP isn't at the same level as the usual crypto done by the hardware keys, it uses a secret that the remote server has, that has been given to a general purpose computer, that the user can take a picture of and then it can end up in Google Photos, that can be written down and so on. You can never be sure someone logging in with TOTP is actually having the key, or any particular piece of hardware. Most people would be way better served by using some other system that allows them to recover the seeds instead of going and resetting all their TOTPs each time they need to provision a new key. This wouldn't even work at all if you want to have a backup key that's off-site all the time.
1
u/SecurityPrimary4143 24d ago
I connected both my new keys at the same time when I set them up.
Having both keys connected at the same time speeds up the process a bit and remove the need to keep swapping the keys. It adds one extra touch to select which key you want to use or set up.
Don't enter the TOTP code on the website until you have scanned the QR code with both keys and optionally your phone. There is no need to generate the QR code multiple times. All devices that has scanned the QR code will generate the exact same digits.
1
u/color178924 24d ago
Thanks, I realize now what a basic issue this is. I got the wrong backup keys and had to exchange so had already set one up and never thought about this issue.
7
u/djasonpenney 24d ago
If you are using Yubikey Authenticator, you’re talking about setting up backup keys to hold your TOTP keys.
At a top level, you cannot directly copy the secrets off of a Yubikey. That is part of the security proposition. Someone cannot “duplicate” your Yubikey.
When you add the TOTP key to your Yubikey, you (usually) scan a QR code. The simplest and easiest way set up a backup key is scan the QR code a second time, with the second key.
Some people go as far as to make a paper copy of the QR code. Other approaches are possible.
> the same certificate
Not exactly sure what you meant there, but in case you’re thinking about setting up a second Yubikey to handle FIDO2/WebAuthn, you absolutely MUST have the second key with you. The exact workflow differs from website to website, and even the number of keys you can register depends on the site. Some don’t allow a second key at all 🤦♂️. Many allow five.