SSH Agent

If you has a rsa-key and don’t want to write in your credentials every time you ssh, you can use ssh-agent instead. Add this to your .bash_profile (or make it a standalone script you execute once at startup) SSHAGENT=$(command -v ssh-agent) SSHAGENTARGS="-s" if ! pgrep -xu $USER ssh-agent &>/dev/null; then if [[ -z "$SSH_AUTH_SOCK" && -x "$SSHAGENT" ]]; then eval "$($SSHAGENT $SSHAGENTARGS)" trap "kill $SSH_AGENT_PID" 0 fi fi Then you add you credentials once by typing ssh-add (which will add ~/....

August 28, 2014  |  🏷️ssh