Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is it possibly to copy a certificate to machine running to OS X Snow Leopard, add it to the System Keychain, then set it to "Always Trust via SSH?"

And if so... how?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

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

share|improve this answer
The quotes messed me up for some reason, removed them and all was well. –  counterbeing Apr 17 '14 at 0:02
@jaberg, and how to add certificate via ssh to local keychain, not system? –  gaussblurinc Sep 9 '14 at 12:30
Thanks muchly! Just a note: One can also add to "$HOME/Library/Keychains/login.keychain" –  Ján Sáreník Jan 21 at 13:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.