Skip to content

Instantly share code, notes, and snippets.

@atereshkov
Created September 16, 2017 10:52
Show Gist options
  • Save atereshkov/c9db1f07b1f9c2cf2a8652af5d0ece1f to your computer and use it in GitHub Desktop.
Save atereshkov/c9db1f07b1f9c2cf2a8652af5d0ece1f to your computer and use it in GitHub Desktop.
How to add a SSH Key to your MacOS Keychain
On Mac OSX, the native SSH client can use the built-in keychain directly.
Open terminal.
Write:
mkdir ~/.ssh
cd ~/.ssh
Copy your private key "id_rsa" to /.ssh folder.
Write in terminal also:
chmod 400 ~/.ssh/id_rsa
ssh-add -K ~/.ssh/id_rsa
You will then be prompted for your passcode, which will be stored in your keychain.
After this you should be ready for a password-less login.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment