Generate SSH keys, defaults at ~/.ssh/id_rsa and id_rsa.pub
ssh-keygen -t rsa -b 4096 -C "firstname.lastname@example.org"
Run Mac’s ssh-add command (not ssh-agent), adds default keys if no key is specifed, -K adds passphrases to keychain.
Create a text file called ~/.ssh/config with this content:
Host * UseKeychain yes AddKeysToAgent yes IdentityFile ~/.ssh/id_rsa