8nws6a
Last Updated: February 25, 2016
·
10.13K
· mrallen1
7330b65ea54e1b90a987a552e5c5cf32

Persist keys in ssh-agent on OS X

On OS X you can persist keys in ssh-agent by storing them in the built in "Keychain" application by using the -K option to ssh-add

ssh-add -K /path/to/key

Be aware there are some special caveats if you're using password protected SSH keys from older installations of OpenSSH (like on a previous version of OS X) when doing this on Mavericks. This Stack Exchange question covers the issue and has a solution.

Say Thanks
Respond

2 Responses
Add your response

10926
Snoopy

Actually, make sure you /usr/bin/ssh-add -K. E.g. you can have brew's version of OpenSSH and still use usr/bin/ssh-add -K to add a key to the system's keychain

over 1 year ago ·
24623
None

Thx a lot gpa. I thought going crazy... but I dont undertand why ssh-add doesn't add permanently...

over 1 year ago ·
Filed Under