Hello,
I have Yubikey 5 NFC (two of them, they behave the same way): I have a PIN-protected gpg subkey there, which I want to use with gpg-agent for SSH authentication. It mostly works, but only when I attempt to make a SSH connection in a few seconds after the key was inserted. If I do that, it works even for subsequent connections in the future (tested at least several hours). However, when I wait for about 10 seconds or more before making the SSH connection, the GPG agent repeatedly requests that I insert the key (it is already inserted and visible in the lsusb output). gpg-card says "End of file" then.
When I pull the key from the USB slot and insert it back, I am able to enter the PIN and use it as SSH key (provided that I do it in a few seconds after the key is inserted).
The scdaemon log can be seen at https://www.fi.muni.cz/~kas/tmp/scd-log.txt .
It _might_ be that somebody else (Firefox?) attempts to use another applet inside the Yubikey shortly after I insert the key or something like that. What else should I do in order to pinpoint the source of the problem?
Thanks for any hints.