Now with Monterey 12.2.1 I'm getting:
$ ssh-add -s /usr/lib/ssh-keychain.dylib
Enter passphrase for PKCS#11:
Could not add card "/usr/lib/ssh-keychain.dylib": agent refused operation
$ ls -l /usr/lib/ssh-keychain.dylib
-rwxr-xr-x 1 root wheel 284784 Feb 6 14:22 /usr/lib/ssh-keychain.dylib
Can also save then restore the rights:
sudo security authorizationdb read com.apple.trust-settings.admin > rights
sudo security authorizationdb write com.apple.trust-settings.admin allow
Do your stuff
sudo security authorizationdb write com.apple.trust-settings.admin < rights
Default appears to be basically entitle and authenticate-admin, not sure how to set both of those via the command line arguments.
Now with Monterey 12.2.1 I'm getting:
$ ssh-add -s /usr/lib/ssh-keychain.dylib
Enter passphrase for PKCS#11:
Could not add card "/usr/lib/ssh-keychain.dylib": agent refused operation
$ ls -l /usr/lib/ssh-keychain.dylib
-rwxr-xr-x 1 root wheel 284784 Feb 6 14:22 /usr/lib/ssh-keychain.dylib
Can also save then restore the rights:
sudo security authorizationdb read com.apple.trust-settings.admin > rights
sudo security authorizationdb write com.apple.trust-settings.admin allow
Do your stuff
sudo security authorizationdb write com.apple.trust-settings.admin < rights
Default appears to be basically entitle and authenticate-admin, not sure how to set both of those via the command line arguments.