Created
April 13, 2012 17:06
-
-
Save HansCz/2378396 to your computer and use it in GitHub Desktop.
SSH (Bash) - adding key to ssh-agent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Linux | |
eval `ssh-agent` | |
ssh-add ~/.ssh/some_key_rsa | |
ssh user@server | |
# Mac | |
## As of the Leopard release of OS X, ssh-agent is more tightly integrated with Keychain. It is possible to store the passphrases of all of your SSH keys securely in Keychain, from which ssh-agent will read them on startup. The bottom line is that it is simple to secure your keys with passphrases, but never have to type the passphrase to use them! Here is how: | |
## Add the pass phrase to each ssh key to keychain: | |
ssh-add -K [path/to/private SSH key] | |
## Whenever you reboot your Mac, all the SSH keys in your keychain will be automatically loaded. You should be able to see the keys in the Keychain Access app, as well as from the command line via: | |
ssh-add -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was not aware of this in Mac OSX - Thank you!