Created
January 16, 2024 19:57
-
-
Save usptact/ad6991914ebf757bd58cd9f591461509 to your computer and use it in GitHub Desktop.
Could not add card "/usr/lib/opensc-pkcs11.so": agent refused operation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System: MacOS Sonoma 14.1.2 | |
First, try to unplug and plug back the Yubikey. | |
Second, try rebooting the system. | |
Make sure `opensc` package is up to date. I am using Macports to install utilities/libraries and other command-line utils. | |
``` | |
$ sudo port upgrade opensc | |
``` | |
The issue is that the library `opensc-pkcs11.so` is installed in a location which is not whitelisted by the system. You will need to copy the library to `/usr/local/lib/`. | |
``` | |
$ cd /usr/local/lib | |
$ sudo cp opensc-pkcs11.so opensc-pkcs11.so.backup | |
$ sudo cp /opt/local/lib/opensc-pkcs11.so . | |
``` | |
Kill `ssh-agent`: | |
``` | |
$ ssh-agent -k | |
``` | |
Restart `ssh-agent`: | |
``` | |
$ eval `$(ssh-agent -s)` | |
``` | |
Try loading the opensc library again: | |
``` | |
$ ssh-add -s /usr/local/lib/opensc-pkcs11.so | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment