Is it possible to copy a certificate to a machine running OS X Snow Leopard, add it to the System Keychain, then set it to "Always Trust via SSH?"
And if so... how?
Is it possible to copy a certificate to a machine running OS X Snow Leopard, add it to the System Keychain, then set it to "Always Trust via SSH?"
And if so... how?
To import a trusted certificate use the terminal command
sudo security add-trusted-cert \
-d \
-r trustRoot \
-k /Library/Keychains/System.keychain \
<certificate>
This will add a trusted certificate to the System.keychain. You should modify the options and paths to suit your situation. See the man page for security for more information.
↬ Rich Trouton, Adding new trusted root certificates to System.keychain
"$HOME/Library/Keychains/login.keychain"
–
Jan 21 '15 at 13:48
security add-trusted-cert and security import?
– Nepoxx
Oct 10 '19 at 15:14
security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain-db /tmp/my-root-ca.cer
– jamshid Feb 13 '21 at 03:32The selected answer does not really work on newer versions of MacOS.
The correct command now is:
sudo security add-trusted-cert -d -r trustAsRoot -k /Library/Keychains/System.keychain <certificate>
Note: tested with MacOS 12(Monterey) and MacOS 13(Ventura)
SecTrustSettingsSetTrustSettings: One or more parameters passed to a function were not valid.
– volvox
Mar 27 '23 at 15:58