How to avoid passphrase each time while using ssh

To avoid being asked “Enter passphrase for key” each time when you login to remote server using ssh or pull push to git, you can store your ssh key passphrase in session.

To avoid being asked "Enter passphrase for key", you can follow below steps:

Step 1: You need to add your ssh key passphrase in a ssh agent which you can do by running command:

$ ssh-add

You will be again asked for passphrase and this time passphrase will be saved in session. and won’t be asked again.

In case of error: If you will get error message Could not open a connection to your authentication agent. that means ssh agent isn’t already running. In that case, you can start one by running command:

$ eval $(ssh-agent)

Once ssh agent started you can repeat step 1 by running command $ ssh-add