I have to run 'ssh-add -s /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so' every time I want to add my key to the agent. This is quite inconvenient. Given that the ssh picks that key by default if I set the PKCS11Provider option in .ssh/config, it is rather unintuitive that ssh-add doesn't.
This sounds like related to the bug #2620. ssh-add does not read the ssh configuration file.
> This sounds like related to the bug #2620. Related maybe. But resolving #2620 won't solve this if you just want to add the key. > ssh-add does not read the ssh configuration file. Mmh, it would be nice if it did in this case. Is that an option? Or maybe there should be some other list of pkcs11 libraries to use for finding keys.
ssh-add can't meaningfully read the configuration file, since it may contain conditional blocks that ssh-add has no way of evaluating. It would be limited to global directives only and IMO that isn't particularly useful. I'd suggest making a shell alias or helper script if you don't want to type the long-form command each time.
closing resolved bugs as of 8.6p1 release