yubikey-agent is a seamless ssh-agent for YubiKeys.
I initially ran into this because I've disabled always-on USB on my laptop. Using up to date Arch Linux, yubikey-agent 0.1.6, pcsclite 1.9.9. Steps to reproduce: - establish a yubikey connection (by using the agent normally) - put computer to sleep - unplug key - plug it back into the same port - wake computer - try to use agent again At this point, yubikey-agent fails to reconnect to the key. I see log messages such as `could not reach YubiKey: selecting piv applet: command failed: transmitting request: an attempt was made to end a non-existent transaction` and `could not reach YubiKey: connecting to smart card: the smart card cannot be accessed because of other connections outstanding`. I can fix it by unplugging the key and plugging it back in again, or restarting either yubikey-agent or pcscd. Moving the key to a different USB port or waiting for the computer to be awake doesn't trigger the problem. I'm not ruling out the possibility of this being a pcscd bug, but maybe yubikey-agent is not handling something that it should somewhere along the way? Something noteworthy though is that in the case that breaks, [the monitor example from yubikey.rs](https://github.com/bluetech/pcsc-rust/blob/master/pcsc/examples/monitor.rs) does not see any events.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by 9ary and has received 2 comments.