"OpenSSH for Windows" version
8.1.0.0
Client OperatingSystem
Windows 10 Enterprise
What is failing
ssh-add -s 'C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll'
Using the -s "Add keys from PKCS#11 provider", i.e. using ssh-agent with smart cards does not work.
Expected output
Identity added ...
Actual output
Enter passphrase for PKCS#11:
Could not add card "C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll": communication with agent failed
ssh-add is able to communicate with the agent. ssh-add without any options adds the default .ssh/id_rsa file, ssh-add -l is able to list it. ssh-add -s PKCS#11 does not work, although it does prompt for a PIN, so it obviously recognizes the -s option.
FWIW, ssh.exe is able to use a smart card with the option -I 'C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll', it's just ssh-agent that is failing.
"OpenSSH for Windows" version
8.1.0.0Client OperatingSystem
Windows 10 Enterprise
What is failing
ssh-add -s 'C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll'Using the
-s"Add keys from PKCS#11 provider", i.e. usingssh-agentwith smart cards does not work.Expected output
Identity added ...Actual output
Enter passphrase for PKCS#11:Could not add card "C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll": communication with agent failedssh-addis able to communicate with the agent.ssh-addwithout any options adds the default.ssh/id_rsafile,ssh-add -lis able to list it.ssh-add -s PKCS#11does not work, although it does prompt for a PIN, so it obviously recognizes the-soption.FWIW,
ssh.exeis able to use a smart card with the option-I 'C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll', it's justssh-agentthat is failing.