Skip to content

Instantly share code, notes, and snippets.

@sergenes
Last active August 29, 2015 14:03
Show Gist options
  • Save sergenes/374991e4d1b13a580432 to your computer and use it in GitHub Desktop.
Save sergenes/374991e4d1b13a580432 to your computer and use it in GitHub Desktop.
How to use SSH private keys on Mac OS X
On Mac OSX, the native SSH client can use the built-in keychain directly. To add your private key to the keychain simply use the command:
ssh-add -K /path/of/private/key
As an example if your private key is stored at ~/.ssh and is named id_rsa, you would use the command:
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