shntnu
1/14/2017 - 10:41 PM

Add SSH key to agent. This step can also be used to avoid entering SSH passphrase when doing git push / pull

Add SSH key to agent. This step can also be used to avoid entering SSH passphrase when doing git push / pull

# copy ssh key to ~/.ssh/id_rsa
# chmod 400  ~/.ssh/id_rsa

# To add the ssh-key to the ssh-agent, the ssh-agent must be running. 
# If the ssh-agent isn't already running, start the ssh-agent.

eval "$(ssh-agent -s)"

#Add your SSH key to the ssh-agent. If you used an existing SSH key rather than generating a new SSH key, you'll need to replace id_rsa in the command with the name of your existing private key file.

ssh-add ~/.ssh/id_rsa

# https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/