I recently updated my copy of OS X and I’m now having trouble with SSH. (I jumped a few versions but based on other posts it looks like the change to MacOS Sierra specifically was part of the problem).
Problem 1: SSH DSA
SSH DSA keys are no longer supported.
Replace the public copy of the DSA key on the server with an RSA public key.
For more information, see How to Fix: MacOS Sierra Upgrade Breaking SSH Keys by Jeff Reifman.
I already have an RSA public key that I use other places, so I’ll upload that.
Of course, it can be tricky to access the server to add the key if your no longer able to SSH in. I used cPanel to add the new SSH key.
Problem 2: Prompt for Passphrase for Key
I’m being prompted for the passphrase for the RSA key I was already using for some of my sites each time I access the site via SSH.
Enter passphrase for key '/Users/salcode/.ssh/my-rsa-key':
I do not want to enter this each time.
I was able to add the following to the beginning of my SSH config file (
Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/my-rsa-key
now when I type in my passphrase, it gets stored.
Relevant GitHub article