Replacing a lost Yubikey | There and back again (2024)

Some weeks ago I lost my purse with everything in there, from residency card, driving license, credit cards, cash cards, all kind of ID cards, and last but not least my Yubikey NEO. Being Japan I did expect that the purse will show up in a few days, most probably the money gone but all the cards intact. Unfortunately not this time. So after having finally reissued most of the cards, I also took the necessary procedures concerning the Yubikey, which contained my GnuPG subkeys, and was used as second factor for several services (see here and here).

Replacing a lost Yubikey | There and back again (1)

Although the GnuPG keys on the Yubikey are considered safe from extraction, I still decided to revoke them and create new subkeys – one of the big advantage of subkeys, one does not start at zero but just creates new subkeys instead of running around trying to get signatures again.

Other things that have to be made is removing the old Yubikey from all the services where it has been used as second factor. In my case that were quite a lot (Google, Github, Dropbox, NextCloud, WordPress, …). BTW, you have a set of backup keys saved somewhere for all the services you are using, right? It helps a lot getting into the system.

GnuPG keys renewal

To remind myself of what is necessary, here are the steps:

  • Get your master key from the backup USB stick
  • revoke the three subkeys that are on the Yubikey
  • create new subkeys
  • install the new subkeys onto a new Yubikey, update keyservers

All of that is quite straight-forward: Use gpg --expert --edit-key YOUR_KEY_ID, after this you select the subkey with key N, followed by a revkey. You can select all three subkeys and revoke them at the same time: just type key N for each of the subkeys (where N is the index starting from 0 of the key).

Next create new subkeys, here you can follow the steps laid out in the original blog. In the same way you can move them to a new Yubikey Neo (good that I bought three of them back then!).

Last but not least you have to update the key-servers with your new public key, which is normally done with gpg --send-keys (again see the original blog).

The most tricky part was setting up and distributing the keys on my various computers: The master key remains as usual on offline media only. On my main desktop at home I have the subkeys available, while on my laptop I only have stubs pointing at the Yubikey. This needs a bit of shuffling around, but should be obvious somehow when looking at the previous blogs.

Full disk encryption

I had my Yubikey also registered as unlock device for the LUKS based full disk encryption. The status before the update was as follows:

$ cryptsetup luksDump /dev/sdaNVersion: 1Cipher name: aes....Key Slot 0: ENABLED ...Key Slot 1: DISABLEDKey Slot 2: DISABLEDKey Slot 3: DISABLEDKey Slot 4: DISABLEDKey Slot 5: DISABLEDKey Slot 6: DISABLEDKey Slot 7: ENABLED...

I was pretty sure that the Slot for the old Yubikey was Slot 7, but I wasn’t sure. So I first registered the new Yubikey in slot 6 with

yubikey-luks-enroll -s 6 -d /dev/sdaN

and checked that I can unlock during boot using the new Yubikey. Then I cleared the slot information in slot 7 with

cryptsetup luksKillSlot /dev/sdaN 7

and again made sure that I can boot using my passphrase (in slot 0) and the new Yubikey (in slot6).

TOTP/U2F second factor authentication

The last step was re-registering the new Yubikey with all the favorite services as second factor, removing the old key on the way. In my case the list comprises several WordPress sites, GitHub, Google, NextCloud, Dropbox and what else I have forgotten.

Although this is the nearly worst case scenario (ok, the main key was not compromised!), everything went very smooth and easy, to my big surprise. Even my Debian upload ability was not interrupted considerably. All in all it shows that having subkeys on a Yubikey is a very useful and effective solution.

Replacing a lost Yubikey | There and back again (2024)
Top Articles
Ankr Price Prediction: 2024, 2025, 2026 - 2030
6 Ways Samsung One UI Is Better Than Stock Android
Antisis City/Antisis City Gym
English Bulldog Puppies For Sale Under 1000 In Florida
Fredatmcd.read.inkling.com
Aadya Bazaar
Ofw Pinoy Channel Su
Craigslist Portales
Jonathan Freeman : "Double homicide in Rowan County leads to arrest" - Bgrnd Search
Craigslist Vermillion South Dakota
Jefferson County Ky Pva
Huge Boobs Images
Current Time In Maryland
Teenleaks Discord
24 Best Things To Do in Great Yarmouth Norfolk
Mflwer
Weather Rotterdam - Detailed bulletin - Free 15-day Marine forecasts - METEO CONSULT MARINE
Red Devil 9664D Snowblower Manual
Buy Swap Sell Dirt Late Model
Craigslist Sparta Nj
Forum Phun Extra
BMW K1600GT (2017-on) Review | Speed, Specs & Prices
Amazing Lash Studio Casa Linda
Betaalbaar naar The Big Apple: 9 x tips voor New York City
Loslaten met de Sedona methode
Dark Entreaty Ffxiv
Local Collector Buying Old Motorcycles Z1 KZ900 KZ 900 KZ1000 Kawasaki - wanted - by dealer - sale - craigslist
Feathers
What Is a Yurt Tent?
'Insidious: The Red Door': Release Date, Cast, Trailer, and What to Expect
Sandals Travel Agent Login
Kaliii - Area Codes Lyrics
Hannah Jewell
Life Insurance Policies | New York Life
Chapaeva Age
The Hoplite Revolution and the Rise of the Polis
Shoreone Insurance A.m. Best Rating
Babbychula
Union Corners Obgyn
Dinar Detectives Cracking the Code of the Iraqi Dinar Market
Craigslist Farm And Garden Reading Pa
Ups Authorized Shipping Provider Price Photos
About Us
The Nikki Catsouras death - HERE the incredible photos | Horror Galore
Unit 11 Homework 3 Area Of Composite Figures
Sam's Club Gas Price Sioux City
Upcoming Live Online Auctions - Online Hunting Auctions
Craigslist Cars For Sale By Owner Memphis Tn
Tyrone Dave Chappelle Show Gif
Ippa 番号
Loss Payee And Lienholder Addresses And Contact Information Updated Daily Free List Bank Of America
Equinox Great Neck Class Schedule
Latest Posts
Article information

Author: Horacio Brakus JD

Last Updated:

Views: 6512

Rating: 4 / 5 (51 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Horacio Brakus JD

Birthday: 1999-08-21

Address: Apt. 524 43384 Minnie Prairie, South Edda, MA 62804

Phone: +5931039998219

Job: Sales Strategist

Hobby: Sculling, Kitesurfing, Orienteering, Painting, Computer programming, Creative writing, Scuba diving

Introduction: My name is Horacio Brakus JD, I am a lively, splendid, jolly, vivacious, vast, cheerful, agreeable person who loves writing and wants to share my knowledge and understanding with you.