HSM2 ssh-add pkcs11

I am trying to add a cardkey to ssh-agent.
Using “ssh-add -s /usr/lib/x86_64-linux-gnu/pkcs11/opensc-pkcs11.so”.
While the agent is running and env vars referring the pid and socket path are exported.
Tried with opensc versions 0.21 and 0.22. Openssh from bullseye and from Unstable.

Always happens:
“Enter passphrase for PKCS#11:”
I enter nothing or 1234 and the agent refuses interaction.
I enter correct userpin and I get:
"Could not add card “path/to/pkcs11.so”: communication with agent failed

Whats up there?

For some reason it works after Firmware 3.4->3.5

1 Like