The -K
option is in Apple's standard version of ssh-add
, which stores the passphrase in your keychain for you when you add an ssh key to the ssh-agent. If you have installed a different version of ssh-add
, it may lack support for -K
.
Solving the issue
To add your SSH private key to the ssh-agent, you can specify the path to the Apple version of ssh-add
:
$ /usr/bin/ssh-add -K ~/.ssh/id_ed25519
Note: Si creaste tu llave con un nombre diferente o si estás agregando una llave existente que tenga un nombre diferente, reemplaza a id_ed25519 en el comando con el nombre de tu archivo de llave privada.
Further reading
- "Generating a new SSH key and adding it to the ssh-agent"
- Linux man page for SSH-ADD
- To view Apple's man page for SSH-ADD, run
man ssh-add
in Terminal