Why key is not listed in Keychain Access after it is added? [duplicate]

Supposedly this console command will add my private SSH key to the Apple Keychain, as discussed in this Answer on the Question, How to use Mac OS X Keychain with SSH keys?:

ssh-add -K path-to-my-private-key-for-SSH

If that succeeds…

➥ What is the type and name of the entry to be found in the Keychain Access.app?

I would like to be able to manually verify and possibly delete that entry.


If you key is not passphrase protected, it looks like macOS won't add it to the Keychain. Presumably this is because the only thing the keychain stores is the passphrase. Everything else seems to require messing with the ~/.ssh/config file.

If your ssh key is passphrase protected, running ssh-add -K path/to/key adds your passphrase to your keychain as a generic password prepended with "SSH:". Also, as for remembering keys, starting with macOS Sierra, Apple chose to stop remembering keys by default. See a brief article (with some external sources) about debugging some SSH problems: https://medium.com/@medley56_82999/i-recently-went-down-a-rabbit-hole-debugging-some-ssh-problems-cross-platform-and-wanted-to-make-bc6890eaf758


It's a little fiddly, but this works on even the latest version of Mojave (as of Darwin 18.2.0)

Prior to Mac OS 10.12.2 (Sierra is 10.12):

Edit ~/.ssh/config:

    Host *
    AddKeysToAgent yes

Mac OS 10.12.2 or greater:

Edit ~/.ssh/config:

    Host *
    UseKeychain yes
    AddKeysToAgent yes
    IdentityFile ~/.ssh/<private key filename>

Open the keychain app, click on the category "passwords", click add, and put the path to the SSH file as the account name:

enter image description here

Now, ssh-add -A should automatically add the key to your ssh-agent without any further hassle.