"gpg --card-edit" with multiple card readers (Yubikey)

Ingo Klöcker kloecker at kde.org
Fri Jul 7 12:05:23 CEST 2023


On Freitag, 7. Juli 2023 11:19:47 CEST Juanjo via Gnupg-users wrote:
> I'm using "gpg (GnuPG) 2.3.3" on AlmaLinux 9 and it works fine with a
> single "YubiKey 5 USB (5.4.3) [CCID]".
> 
> The issue comes when I plug more than one Yubikey.
> 
> I can use "gpg --card-status all" to retrieve the information of all
> connected Yubikeys or "gpg --card-status ID" (where ID is the value from
> field "Application ID") to retrieve the information of a pacific Yubikey.
> 
> I have tried to do the same with "gpg --card-edit" but this command does
> not support passing the ID of a specific Yubikey and it always selects the
> last plugged Yubikey.
> 
> So, is there a way to select a specific Yubikey for the "gpg --card-edit"
> command?

You may have luck with setting a specific reader-port (see `man scdaemon`).

But, unless you need to use the command line, it's probably much easier to use 
Kleopatra which supports multiple card readers and multiple card apps 
(OpenPGP, PIV) per reader out of the box. Kleopatra doesn't support everything 
`gpg --card-edit` or the new gpg-card tool support.

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20230707/1403ae8e/attachment-0001.sig>


More information about the Gnupg-users mailing list