<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>YubiKey on Linux — Get Started the Safe Way on Benjamin Italiaander</title><link>https://tlnd.org/Linux/yubikey/</link><description>Recent content in YubiKey on Linux — Get Started the Safe Way on Benjamin Italiaander</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 28 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tlnd.org/Linux/yubikey/index.xml" rel="self" type="application/rss+xml"/><item><title>YubiKey 9 — Disk encryption (LUKS) and Git signing</title><link>https://tlnd.org/Linux/yubikey/09_luks_and_git_signing/</link><pubDate>Sat, 28 Nov 2026 00:00:00 +0000</pubDate><guid>https://tlnd.org/Linux/yubikey/09_luks_and_git_signing/</guid><description>&lt;h1 id="9-disk-encryption-luks-and-git-signing"&gt;9. Disk encryption (LUKS) and Git signing&lt;/h1&gt;
&lt;p&gt;Two more things your YubiKey can do with &lt;strong&gt;FIDO2&lt;/strong&gt;, the same function you used for &lt;a href="https://tlnd.org/Linux/yubikey/04_ssh_fido2/"&gt;SSH in chapter 4&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Unlock your encrypted disk&lt;/strong&gt; at boot: insert the key, type the FIDO2 PIN, touch. No long passphrase any more.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sign your Git commits&lt;/strong&gt;, so everyone (and GitHub) can see that a commit really came from you.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Before you start: you need a FIDO2 PIN (&lt;a href="https://tlnd.org/Linux/yubikey/02_first_time_setup/"&gt;chapter 2&lt;/a&gt;), and ideally a &lt;strong&gt;second YubiKey&lt;/strong&gt; as a backup.&lt;/p&gt;</description></item><item><title>YubiKey 1 — Installation (Debian/Ubuntu and Fedora)</title><link>https://tlnd.org/Linux/yubikey/01_installation/</link><pubDate>Wed, 01 Oct 2025 12:30:21 +0100</pubDate><guid>https://tlnd.org/Linux/yubikey/01_installation/</guid><description>&lt;h1 id="1-installation"&gt;1. Installation&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/Linux/yubikey/"&gt;← Back to overview&lt;/a&gt; · Next: &lt;a href="https://tlnd.org/Linux/yubikey/02_first_time_setup/"&gt;2. First-time setup →&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; install the software, start the smartcard daemon and see your YubiKey with &lt;code&gt;ykman info&lt;/code&gt; and &lt;code&gt;gpg --card-status&lt;/code&gt;.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Package&lt;/th&gt;
 &lt;th&gt;What it is&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;GnuPG (&lt;code&gt;gnupg2&lt;/code&gt;)&lt;/td&gt;
 &lt;td&gt;The universal crypto engine (OpenPGP)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;scdaemon&lt;/td&gt;
 &lt;td&gt;Smartcard daemon for GnuPG&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;pcsc-lite / pcscd&lt;/td&gt;
 &lt;td&gt;PC/SC smartcard daemon (talks to the YubiKey)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;yubikey-manager&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;ykman&lt;/code&gt;, the YubiKey CLI&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;pcsc-tools&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;pcsc_scan&lt;/code&gt;, handy for debugging&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id="11-debian--ubuntu"&gt;1.1 Debian / Ubuntu&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install gnupg2 scdaemon pcscd pcsc-tools yubikey-manager yubikey-personalization pipx
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; --now pcscd.socket
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Optional (Ubuntu only) — newer Yubico packages from the official PPA:&lt;/p&gt;</description></item><item><title>YubiKey 2 — First-time setup (the bare minimum)</title><link>https://tlnd.org/Linux/yubikey/02_first_time_setup/</link><pubDate>Wed, 01 Oct 2025 12:30:21 +0100</pubDate><guid>https://tlnd.org/Linux/yubikey/02_first_time_setup/</guid><description>&lt;h1 id="2-first-time-setup--the-bare-minimum"&gt;2. First-Time Setup — The Bare Minimum&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/Linux/yubikey/01_installation/"&gt;← 1. Installation&lt;/a&gt; · &lt;a href="https://tlnd.org/Linux/yubikey/"&gt;Overview&lt;/a&gt; · Next: &lt;a href="https://tlnd.org/Linux/yubikey/03_totp_oath/"&gt;3. TOTP codes →&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Every YubiKey leaves the factory with &lt;strong&gt;the same, publicly known defaults&lt;/strong&gt;. Until you change them, anybody who holds your key can use it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;✅ Do this checklist for &lt;strong&gt;every&lt;/strong&gt; YubiKey you own, including the backup key.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;✔&lt;/th&gt;
 &lt;th&gt;Application&lt;/th&gt;
 &lt;th&gt;What to change&lt;/th&gt;
 &lt;th&gt;Default&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;☐&lt;/td&gt;
 &lt;td&gt;FIDO2&lt;/td&gt;
 &lt;td&gt;Set a PIN&lt;/td&gt;
 &lt;td&gt;&lt;em&gt;(none)&lt;/em&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;☐&lt;/td&gt;
 &lt;td&gt;PIV&lt;/td&gt;
 &lt;td&gt;PIN&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;123456&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;☐&lt;/td&gt;
 &lt;td&gt;PIV&lt;/td&gt;
 &lt;td&gt;PUK&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;12345678&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;☐&lt;/td&gt;
 &lt;td&gt;PIV&lt;/td&gt;
 &lt;td&gt;Management key&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;010203040506070801020304050607080102030405060708&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;☐&lt;/td&gt;
 &lt;td&gt;OpenPGP&lt;/td&gt;
 &lt;td&gt;User PIN&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;123456&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;☐&lt;/td&gt;
 &lt;td&gt;OpenPGP&lt;/td&gt;
 &lt;td&gt;Admin PIN&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;12345678&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;☐&lt;/td&gt;
 &lt;td&gt;OATH&lt;/td&gt;
 &lt;td&gt;Password&lt;/td&gt;
 &lt;td&gt;&lt;em&gt;(none)&lt;/em&gt; — see &lt;a href="https://tlnd.org/Linux/yubikey/03_totp_oath/"&gt;chapter 3&lt;/a&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;💾 &lt;strong&gt;Write down your PUK, Admin PIN and management key and store them offline&lt;/strong&gt; (paper, or a QR code in a safe).
I have an instruction for making a QR code in the CLI &lt;a href="https://github.com/Benjamin-Italiaander/My_Notes/blob/main/Linux/cli/qrcode.md" class="external-link" target="_blank" rel="noopener"&gt;here&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>YubiKey 3 — TOTP codes (OATH)</title><link>https://tlnd.org/Linux/yubikey/03_totp_oath/</link><pubDate>Wed, 01 Oct 2025 12:30:21 +0100</pubDate><guid>https://tlnd.org/Linux/yubikey/03_totp_oath/</guid><description>&lt;h1 id="3-totp-codes-oath"&gt;3. TOTP Codes (OATH)&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/Linux/yubikey/02_first_time_setup/"&gt;← 2. First-time setup&lt;/a&gt; · &lt;a href="https://tlnd.org/Linux/yubikey/"&gt;Overview&lt;/a&gt; · Next: &lt;a href="https://tlnd.org/Linux/yubikey/04_ssh_fido2/"&gt;4. SSH with FIDO2 →&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; store your authenticator codes (GitHub, Google, …) on the YubiKey instead of (or next to) your phone.&lt;/p&gt;
&lt;h3 id="why-copy-an-existing-totp-secret"&gt;Why copy an existing TOTP secret?&lt;/h3&gt;
&lt;p&gt;When a website shows you a QR code, it also shows a text secret (Base32, e.g. &lt;code&gt;JBSWY3DPEHPK3PXP&lt;/code&gt;). If you add &lt;strong&gt;that same secret&lt;/strong&gt; to several YubiKeys (and/or an authenticator app), they all produce the same codes — so you have a backup.&lt;/p&gt;</description></item><item><title>YubiKey 4 — SSH with FIDO2</title><link>https://tlnd.org/Linux/yubikey/04_ssh_fido2/</link><pubDate>Wed, 01 Oct 2025 12:30:21 +0100</pubDate><guid>https://tlnd.org/Linux/yubikey/04_ssh_fido2/</guid><description>&lt;h1 id="4-ssh-with-fido2"&gt;4. SSH with FIDO2&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/Linux/yubikey/03_totp_oath/"&gt;← 3. TOTP codes&lt;/a&gt; · &lt;a href="https://tlnd.org/Linux/yubikey/"&gt;Overview&lt;/a&gt; · Next: &lt;a href="https://tlnd.org/Linux/yubikey/05_openpgp_gpg_ssh/"&gt;5. OpenPGP →&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; an SSH key whose private part never leaves the YubiKey. This is the &lt;strong&gt;simplest&lt;/strong&gt; secure way to use SSH with a YubiKey. (OpenPGP, chapter 5, is more flexible but more complex.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Before you start:&lt;/strong&gt; complete &lt;a href="https://tlnd.org/Linux/yubikey/02_first_time_setup/"&gt;chapter 2&lt;/a&gt; — at least the FIDO2 PIN. You should know the difference between a private and a public key.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="41-how-it-works"&gt;4.1 How it works&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;real private key&lt;/strong&gt; is created and stored &lt;strong&gt;inside the YubiKey&lt;/strong&gt; — it can never be extracted or imported.&lt;/li&gt;
&lt;li&gt;A small &lt;strong&gt;key handle&lt;/strong&gt; file is stored in &lt;code&gt;~/.ssh&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;To log in you need the &lt;strong&gt;YubiKey + touch (+ PIN)&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Never share&lt;/th&gt;
 &lt;th&gt;Safe to share&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;~/.ssh/yubikey&lt;/code&gt; (key handle)&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;~/.ssh/yubikey.pub&lt;/code&gt; (public key)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;your YubiKey&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;💡 Disable password logins on your servers (&lt;code&gt;PasswordAuthentication no&lt;/code&gt;) to get the full benefit.&lt;/p&gt;</description></item><item><title>YubiKey 5 — OpenPGP: GPG and SSH</title><link>https://tlnd.org/Linux/yubikey/05_openpgp_gpg_ssh/</link><pubDate>Wed, 01 Oct 2025 12:30:21 +0100</pubDate><guid>https://tlnd.org/Linux/yubikey/05_openpgp_gpg_ssh/</guid><description>&lt;h1 id="5-openpgp--gpg--ssh"&gt;5. OpenPGP — GPG + SSH&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/Linux/yubikey/04_ssh_fido2/"&gt;← 4. SSH with FIDO2&lt;/a&gt; · &lt;a href="https://tlnd.org/Linux/yubikey/"&gt;Overview&lt;/a&gt; · Next: &lt;a href="https://tlnd.org/Linux/yubikey/06_age_piv/"&gt;6. age encryption →&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a GPG &lt;strong&gt;master key&lt;/strong&gt; that is kept offline,&lt;/li&gt;
&lt;li&gt;three &lt;strong&gt;subkeys&lt;/strong&gt; (Sign, Encrypt, Authenticate) on the YubiKey,&lt;/li&gt;
&lt;li&gt;SSH logins through &lt;code&gt;gpg-agent&lt;/code&gt; with the Authentication subkey,&lt;/li&gt;
&lt;li&gt;multi-hop SSH with &lt;code&gt;ProxyJump&lt;/code&gt; (without agent forwarding).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Before you start:&lt;/strong&gt; &lt;a href="https://tlnd.org/Linux/yubikey/01_installation/"&gt;chapter 1&lt;/a&gt; (incl. Fedora step 5 for the shell settings).&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="51-the-idea-in-one-picture"&gt;5.1 The idea in one picture&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Master key [C] ──► offline backup (USB in a safe) — only for creating/renewing subkeys
 ├─ Subkey [S] Sign ──► YubiKey slot 1
 ├─ Subkey [E] Encrypt ──► YubiKey slot 2
 └─ Subkey [A] Authenticate ──► YubiKey slot 3 ──► used for SSH
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In the commands below, replace &lt;code&gt;&amp;lt;KEYID&amp;gt;&lt;/code&gt; with your key ID or email address.&lt;/p&gt;</description></item><item><title>YubiKey 6 — age encryption (PIV)</title><link>https://tlnd.org/Linux/yubikey/06_age_piv/</link><pubDate>Wed, 01 Oct 2025 12:30:21 +0100</pubDate><guid>https://tlnd.org/Linux/yubikey/06_age_piv/</guid><description>&lt;h1 id="6-age-encryption-piv"&gt;6. age Encryption (PIV)&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/Linux/yubikey/05_openpgp_gpg_ssh/"&gt;← 5. OpenPGP&lt;/a&gt; · &lt;a href="https://tlnd.org/Linux/yubikey/"&gt;Overview&lt;/a&gt; · Next: &lt;a href="https://tlnd.org/Linux/yubikey/07_linux_login_pam/"&gt;7. Linux login →&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; encrypt files with &lt;a href="https://github.com/FiloSottile/age" class="external-link" target="_blank" rel="noopener"&gt;&lt;code&gt;age&lt;/code&gt;&lt;/a&gt; so that only your YubiKey(s) — or an offline backup key — can decrypt them. A simple alternative to OpenPGP.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="61--post-quantum-note"&gt;6.1 ⚠️ Post-quantum note&lt;/h2&gt;
&lt;p&gt;age with a YubiKey is &lt;strong&gt;not post-quantum (PQ) secure&lt;/strong&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Only software age keys with a PQ algorithm (&lt;code&gt;age1pq1…&lt;/code&gt;) are PQ-resistant.&lt;/li&gt;
&lt;li&gt;You &lt;strong&gt;cannot import&lt;/strong&gt; an existing age identity into a YubiKey — it can only generate its own.&lt;/li&gt;
&lt;li&gt;PQ and non-PQ recipients &lt;strong&gt;cannot be mixed&lt;/strong&gt; in one file.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;👉 If you need post-quantum encryption, a YubiKey is currently &lt;strong&gt;not the right tool&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>YubiKey 7 — Linux login with PAM (sudo, desktop, TTY)</title><link>https://tlnd.org/Linux/yubikey/07_linux_login_pam/</link><pubDate>Wed, 01 Oct 2025 12:30:21 +0100</pubDate><guid>https://tlnd.org/Linux/yubikey/07_linux_login_pam/</guid><description>&lt;h1 id="7-linux-login-with-pam-sudo-desktop-tty"&gt;7. Linux Login with PAM (sudo, desktop, TTY)&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/Linux/yubikey/06_age_piv/"&gt;← 6. age encryption&lt;/a&gt; · &lt;a href="https://tlnd.org/Linux/yubikey/"&gt;Overview&lt;/a&gt; · Next: &lt;a href="https://tlnd.org/Linux/yubikey/08_troubleshooting/"&gt;8. Troubleshooting →&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; require your YubiKey (touch) for &lt;code&gt;sudo&lt;/code&gt;, &lt;code&gt;su&lt;/code&gt;, the desktop login (GDM) and TTY login, using &lt;code&gt;pam_u2f&lt;/code&gt; (FIDO2/U2F).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;You can lock yourself out.&lt;/strong&gt; Keep a &lt;strong&gt;root shell open in a second terminal&lt;/strong&gt; (&lt;code&gt;sudo -i&lt;/code&gt;) while you change PAM files, and test before you log out. If something breaks, remove the line you added.&lt;/p&gt;</description></item><item><title>YubiKey 8 — Troubleshooting</title><link>https://tlnd.org/Linux/yubikey/08_troubleshooting/</link><pubDate>Wed, 01 Oct 2025 12:30:21 +0100</pubDate><guid>https://tlnd.org/Linux/yubikey/08_troubleshooting/</guid><description>&lt;h1 id="8-troubleshooting"&gt;8. Troubleshooting&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/Linux/yubikey/07_linux_login_pam/"&gt;← 7. Linux login&lt;/a&gt; · &lt;a href="https://tlnd.org/Linux/yubikey/"&gt;Overview&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="-quick-checks"&gt;🧪 Quick checks&lt;/h2&gt;
&lt;p&gt;Run these first — they tell you where the problem is:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;lsusb &lt;span class="p"&gt;|&lt;/span&gt; grep -i yubi &lt;span class="c1"&gt;# is the key on USB?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl status pcscd.socket &lt;span class="c1"&gt;# is the smartcard daemon running?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ykman info &lt;span class="c1"&gt;# can ykman talk to it?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpg --card-status &lt;span class="c1"&gt;# can GnuPG talk to it?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpg -K &lt;span class="c1"&gt;# ssb&amp;gt; = subkey on the YubiKey&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$SSH_AUTH_SOCK&lt;/span&gt; &lt;span class="c1"&gt;# which SSH agent is used?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ssh-add -L &lt;span class="c1"&gt;# which keys does the agent offer?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ssh -vvv host &lt;span class="c1"&gt;# what happens during login?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="the-yubikey-is-not-found"&gt;The YubiKey is not found&lt;/h2&gt;
&lt;h3 id="gpg---card-status--no-such-device--card-not-present"&gt;&lt;code&gt;gpg --card-status&lt;/code&gt; → &lt;em&gt;No such device&lt;/em&gt; / &lt;em&gt;Card not present&lt;/em&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Is &lt;code&gt;pcscd&lt;/code&gt; running?
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; --now pcscd.socket
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Restart scdaemon:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpgconf --kill scdaemon
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpg --card-status
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Let scdaemon use &lt;code&gt;pcscd&lt;/code&gt; instead of its own USB driver — add to &lt;code&gt;~/.gnupg/scdaemon.conf&lt;/code&gt;:
&lt;pre tabindex="0"&gt;&lt;code class="language-conf" data-lang="conf"&gt;disable-ccid
&lt;/code&gt;&lt;/pre&gt;then &lt;code&gt;gpgconf --kill scdaemon&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fedora:&lt;/strong&gt; &lt;em&gt;access denied&lt;/em&gt; from polkit → add the polkit rule from &lt;a href="https://tlnd.org/Linux/yubikey/01_installation/#step-4--polkit-rule-only-if-you-get-access-denied--no-such-device"&gt;1.2 step 4&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="ykman-works-but-gpg-doesnt-or-the-other-way-around"&gt;&lt;code&gt;ykman&lt;/code&gt; works but &lt;code&gt;gpg&lt;/code&gt; doesn&amp;rsquo;t (or the other way around)&lt;/h3&gt;
&lt;p&gt;Only one program can hold the card at a time. Kill the other one:&lt;/p&gt;</description></item></channel></rss>