How to permanently save SSH private key’s passphrase to OSX Keychain

Keychain is really a convenient tool for managing passwords even for terminal users, specifically for those people who uses passphrase in their private key. For newer versions of OSX, Catalina in my case, there’s an additional step to add and being able to use it.

I will be assuming that you already have your private key with you and just want to make things more convenient.

Step 1 — Add your Private Key to Keychain

Enter your passphrase, then hit enter.

Step 2 — Allow SSH to use always your keychain

Modify your SSH configuration file and add the following lines:

Note: If you are using multiple private keys, just add a new entry in your SSH config.