How to avoid always entering passphrase for id_rsa on terminal startup?

HosseinK picture HosseinK · Nov 29, 2016 · Viewed 8.7k times · Source

Currently every time I start up terminal I get prompted the following:

Last login: Mon Nov 28 21:32:16 on ttys000

Agent pid 2733

Enter passphrase for /Users/my_name/.ssh/id_rsa:

Could you please guide me on how I can avoid having to enter a passphrase everytime?

Answer

Jules picture Jules · Jul 4, 2018

You could add your passphrase to your keychain:

ssh-add -K ~/.ssh/id_rsa

Or you can add it in your ~/.ssh/config:

Host *
UseKeychain yes