


For example, I have one additional line that reads IdentityFile ~/.ssh/id_ed25519 for a 2nd private key. If you have other private keys in your ~/.ssh directory, also add an IdentityFile line for each of them.

ssh/config file, add the following lines: Host *Ĭhange ~/.ssh/id_rsa to the actual filename of your private key. ssh directory in your home dir, make a file called config. If you haven't already, create an ~/.ssh/config file. Here's how you set it up:Įnsure you've completed Step 1 above to store the key in the keychain. The solution is fairly simple, and is outlined in this github thread comment. Because of this, you will get prompted to enter the passphrase for a key after you upgrade, and again after each restart.
#MACOS SSH KEYGEN MAC OS UPDATE#
It seems that OSX Sierra removed the convenient behavior of persisting your keys between logins, and the update to ssh no longer uses the keychain by default. Check with which ssh-add.) Step 2 - Configure SSH to always use the keychain Also, be sure you are using Apple's version of /usr/bin/ssh-add and not something installed with brew etc. (If you're on a pre-Sierra version of OSX, you're done, Step 2 is not required. Just do this once: ssh-add -K ~/.ssh/Įnter your key passphrase, and you won't be asked for it again. On OSX Sierra and later, you also need to configure SSH to always use the keychain (see Step 2 below).Īlternatively you can use a key without a passphrase, but if you prefer the security that's certainly acceptable with this workflow. On OSX, the native ssh-add client has a special argument to save the private key's passphrase in the OSX keychain, which means that your normal login will unlock it for use with ssh.
