jeudi 19 février 2015

Bash script to import RootCA and set it to Always Trust from Server


I am working on a way to import a RootCA into the login keychain of OSX and set it to always trust, the cert is located on a file share server.


I am relatively new to the whole Bash scripting scene and have been actively researching this issue for a few weeks now with some success. I have been able to import and trust a RootCA locally, but unable to reach out to a server and import the cert.


Here is what I currently have: sudo security add-trusted-cert -d -r trustAsRoot -k $HOME/Library/Keychains/login.keychain $HOME/Desktop/rootCA


When I replace "$HOME/Desktop/rootCA" with my server path, I get prompted for a password, then receive a message: "***Error reading file "Server path" "Error reading file "Server path"


I have tried to SSH to the server and have been greeted with "Connection refused on port 22"... I don't have access to manage this server either.


Any thoughts? If you need more details, please let me know and I can try my best to explain.





Aucun commentaire:

Enregistrer un commentaire