I updated to macOS Sierra 10.12 (GM) tonight and surprisingly everything seemed to work without any issues … at least so far. One thing that did come up, but was easily remedied, was that all of my SSH keys stopped working.
ssh git@github.com
The above command prompted for a password (assuming you use GitHub), which is should not do if SSH keys are set up properly.
Assuming your SSH keys are RSA-based, I have a quick solution:
-
cd ~/.ssh
- This will get us into our user SSH folder
-
ssh-add -l
- This lists all keys that the SSH agent knows about. After upgrading, this returned zero keys! Note: In reality ssh-add is session-based, and so each time you log in this command will show zero results (see below).
-
ssh-add -K ~/.ssh/[your-private-ssh-key-name]
- You’ll be asked for the password (if one is set) for this private key
- -K tells ssh-add to save the key into your Keychain, so that on subsequent logins, even if ssh-add -l shows nothing, ssh will also look in your Keychain to see if the key is save there.
- [your-private-ssh-key-name] is likely id_rsa, but it could be others as well
- Repeat step 3 as needed
- You’ll be asked for the password (if one is set) for this private key
-
ssh-add -l
- You should now see you SSH key(s) listed
That worked for me, though oddly I had to do this process twice as the first time I made it to step four, then exited Terminal, none of my applications using SSH worked, I opened Terminal again and found that nothing was listed when I ran the ssh-add list command.
UPDATE:
This doesn’t seem to do what I thought it should, namely, upon reboot I had to repeat this process again. I have since added the following steps:
cd ~/.ssh/
sudo vim config
I then added this line to my SSH confile:
IdentityFile ~/.ssh/[your-private-ssh-key-name]
I saved the config file, and now my SSH keys work as expected.