4

I recently purchased a Yubikey 4, which is working great for U2F and a static password, but I'd like to use the PGP Smartcard functionality as well, so I connected the Yubikey to my computer and checked if it was recognized, by running gpg2 --card-status, which does not work, more on this later. I then tried gpg --card-status, which does work, but doesn't help me much because gpg and gpg2 have different keyrings so I can't use gpg(without 2) to transfer my private key.

The error message:

[jcgruenhage@greensp3 ~]$ gpg2 --card-status
gpg: error getting version from 'scdaemon': No SmartCard daemon
gpg: OpenPGP card not available: No SmartCard daemon

Correct output:

[jcgruenhage@greensp3 ~]$ gpg --card-status 
Application ID ...: D2760001240102010006042634800000
Version ..........: 2.1
Manufacturer .....: unknown
Serial number ....: 04263480
Name of cardholder: [not set]
Language prefs ...: [not set]
Sex ..............: unspecified
URL of public key : [not set]
Login data .......: [not set]
Private DO 1 .....: [not set]
Private DO 2 .....: [not set]
Signature PIN ....: not forced
Key attributes ...: 2048R 2048R 2048R
Max. PIN lengths .: 127 127 127
PIN retry counter : 3 0 3
Signature counter : 0
Signature key ....: [none]
Encryption key....: [none]
Authentication key: [none]
General key info..: [none]

Is there any way to get gpg2 to use scdaemon instead of gpg?
In case this is necessary: I'm using Fedora 23 on a Surface Pro 3.

  • Not relevant anymore, it works fine on fedora 24, with gpg and gpg2 as well – Jan Christian Grünhage Jul 14 '16 at 10:22
1

Just to clarify: gpg is an alias for binary.

gpg --version
gpg (GnuPG/MacGPG2) 2.2.8

To use you Yubikey as smart card, you can follow one of this guides: https://developers.yubico.com/PIV/Guides/SSH_with_PIV_and_PKCS11.html or http://www.engineerbetter.com/blog/yubikey-ssh/

I have the same problem as you described with GPG 2.1 and 2.2.9 from repo, so only GPG 2.2.8 works fine for me.

  • gpg may be a link to gpg2 for you, but that's not the case for others. – AndrolGenhald Aug 27 '18 at 15:36
  • The main question is: what version was used, but not which symlink. – Piotr Gwóźdź Aug 27 '18 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.