Skip to content

Instantly share code, notes, and snippets.

@H0neyBadger
Created May 12, 2018 18:22
Show Gist options
  • Save H0neyBadger/18800fe9434b1fb80d2db8f083f798df to your computer and use it in GitHub Desktop.
Save H0neyBadger/18800fe9434b1fb80d2db8f083f798df to your computer and use it in GitHub Desktop.
linux profile
# load ssh vars
# SSH_AUTH_SOCK=/tmp/ssh-XOw0SlklDoPT/agent.2154
# SSH_AGENT_PID=2155
source .ssh_agent
pgrep ssh-agent --uid "$(id -u)" -ns "${SSH_AGENT_PID}"
if [ $? != 0 ]
then
eval "$(ssh-agent)"
ssh-add
fi
env | grep -P '(SSH_AUTH_SOCK=|SSH_AGENT_PID=)' > .ssh_agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment