Created
May 12, 2018 18:22
-
-
Save H0neyBadger/18800fe9434b1fb80d2db8f083f798df to your computer and use it in GitHub Desktop.
linux profile
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
# 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