Add ssh-agent to your bash start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Best way to use ssh keys is to add them to SSH Agent, this will will allow you use ssh without needing to specify pasword for your SSH key all the time. | |
To do this add these lines to you `.bash_profile` or `.profile` | |
```bash | |
SSHAGENT=/usr/bin/ssh-agent | |
SSHAGENTARGS="-s" | |
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then | |
eval `$SSHAGENT $SSHAGENTARGS` | |
trap "kill $SSH_AGENT_PID" 0 | |
fi | |
ssh-add ~/.ssh/id_rsa | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment