DeAI Research
Source · BIROn (Birkbeck, University of London)

How to use YubiKey for authentication and sudo on Ubuntu 24.04

2026Martin Paul Eve

cid 8011bdc54805d4e5bf0f6540f6797d59c8f2b5b0f4a76f3331a3520a89ed2fa9 · original · open access · via openalex

Title: How to use YubiKey for authentication and sudo on Ubuntu 24.04
Authors: Martin Paul Eve
Venue: BIROn (Birkbeck, University of London)
Year: 2026
Canonical: openalex:https://openalex.org/W7212462530
URL: https://openalex.org/W7212462530
Collector: openalex
OA: true

ABSTRACT
I have had two YubiKeys for years. They are very cool devices. I used to store my keys themselves on the YubiKey, and perhaps I'll go back to doing that. But 1Password has me covered for now. What I did realise while moving to a new PC is that there is no concise guide to how to set up YubiKey on a recent Ubuntu Linux setup. I am on Ubuntu 24.04, using the Gnome desktop environment (this might be significant) and here's what I did. This gives me passwordless sudo with a touch of the YubiKey and the ability to use the YubiKey in polkit popups (when permission is requested). If you remove the YubiKey key while that prompt is visible, it will fall back to asking for a password.