There have been two issues regarding this already reported: #287 and #409.
Yes, it is possible to target a specific YubiKey out of multiple plugged in ones, but that list is not stable, if your are adding / removing YubiKeys then it's completely arbitrary between command calls. Also there's no information about what serial that YubiKey has. Yes, I can connect and query, but by the next time I call a piv command the reader might point to a completely new YubiKey if I swapped one out. It's just completely unreliable to pick a correct YubiKey that you know the serial of.
Can we please have a proper flag that select and operates on a correct key without everyone having to hack around it? It seems such an obvious thing to do. ykman does it properly (alas it cannot sign).
There have been two issues regarding this already reported: #287 and #409.
Yes, it is possible to target a specific YubiKey out of multiple plugged in ones, but that list is not stable, if your are adding / removing YubiKeys then it's completely arbitrary between command calls. Also there's no information about what serial that YubiKey has. Yes, I can connect and query, but by the next time I call a piv command the reader might point to a completely new YubiKey if I swapped one out. It's just completely unreliable to pick a correct YubiKey that you know the serial of.
Can we please have a proper flag that select and operates on a correct key without everyone having to hack around it? It seems such an obvious thing to do.
ykmandoes it properly (alas it cannot sign).