Mac OS Sierra SSH keys no longer work

January 6th, 2017 by Alex Leave a reply »

It might happen that after updating your mac OS to Sierra, you no longer can login through SSH or use Git.

This is frustrating, but there is a fix. Run

ssh-add -A

You might see something like

Identity added: /Users/alex/.ssh/id_rsa (/Users/alex/.ssh/id_rsa)

Which means the key you had previously was added successfully to list of SSH known keys. But, it is known that after reboot everything will go away. So to fix that also, edit your bash_profile file

nano ~/.bash_profile

Or, if you have zsh, then

nano ~/.zshrc

Add to the end

ssh-add -A 2>/dev/null;

Done, no more problems for SSH.


Leave a Reply