buptczq/WinCryptSSHAgent

Cannot authenticate SSH after any GPG operations

hfziu opened this issue · 2 comments

hfziu commented

Hi,

I'm using a YubiKey 5 NFC with WinCryptSSHAgent. I've generated a certificate in PIV certificate Slot 9a:
image

and it works well with WinSSH. However, after each time I perform any GPG operation (e.g., gpg --card-status, gpg --sign, etc.), I can no longer use my YubiKey with WinCryptSSHAgent to authenticate SSH connections:
"The smart card cannot perform the requested operation or the operation requires a different smart card."
image

Seems like that once I've performed any GPG operation, Windows will no longer read the PIV certificates stored in YubiKey until replugging.

Any idea or solution on this issue? Thanks a lot!

hfziu commented

Append: seems like the same issue with #1 and #10

OpenPGP conflicts with WinCryptSSHAgent

AFAIK this is common gpg issue, it exclusively locks tokens. It was reproduced in my environment on ubuntu 18 host.