Pcscd has to be restarted at every boot to get my SSH keys from my YubiKey

Since about F36 I have to restart pcscd every time to get my keys listed with ssh-add -l. It may have to do with a lock obtained by something else than pcscd (I guess gnupg), and thus fails. Maybe I’m missing something in my ~/.gnupg/scdaemon.conf

I’ve tried all these (also the commented ones):

card-timeout 300
#reader-port Yubico Yubi
disable-ccid
#pcsc-driver /usr/lib64/libpcsclite.so.1

But basically the problem is that lock, because the restart of pcscd is what fixes it. Not systemctl --user restart gpg-agent.service, but systemctl restart pcscd.

Does anyone have a better fix? I have a YubiKey 5 NFC.

Related issue, but also no solution:

1 Like

Found the solution here:
https://bugzilla.redhat.com/show_bug.cgi?id=1893131

~/.gnupg/scdaemon.conf must contain:

disable-ccid
pcsc-shared
pcsc-driver /usr/lib64/libpcsclite.so.1

Of course make sure the path to the pcsc-driver matches. Using rpm -ql pcsc-lite-libs | grep so shows you where it is. The shortest one is often best, it symlinks to the current release.

In my case I could remove the pcsc-driver line, I guess the pcsc-shared option is key.

1 Like