I switched from an El Capitan machine to a new MacBook Air with Sierra.
With El Capitan, when I ssh into an host from terminal, the SSH passphrase GUI dialog showed up, and then it never asked again the passphrase for the whole login session.

Now with Sierra the dialog is not showing up, I recurred to adding the following lines to .bashrc:

eval $(ssh-agent)

but the drawback is that every new terminal asks for the passphrase.

How to diagnose the missing dialog?

1 Answer 1


Instead of ssh-add, use

ssh-add -A

This uses the Keychain to find the passphrase, and since your Keychain should be unlocked because you're logged in, you won't be prompted.

(Sierra drastically changed how ssh keys are handled by the OS. The dialog is no more.)

  • thanks you for your answer, it says "No identity found in the keychain.". I suppose I need to make "Keychain Access" to know about the keys in my ~/.ssh, but how?
    – enzotib
    Commented May 24, 2017 at 17:33
  • 2
    @enzotib To add the passphrase to Keychain, run ssh-add -K and enter your passphrase.
    – grg
    Commented May 24, 2017 at 17:34
  • OK, I used ssh-add -K una tantum to add keys to my keychain, and I only leaved ssh-add -A in my .bashrc, and now it seems to work properly, thank you.
    – enzotib
    Commented May 24, 2017 at 17:57
  • @enzotib Yes, that's correct. If you change your ssh key, you'll need to re-run ssh-add -K once to add it to Keychain.
    – grg
    Commented May 24, 2017 at 17:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .