Last active
April 19, 2018 13:24
-
-
Save omkensey/77558548eaf380ccbe661e45b0bf017f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
if [ -f ~/.ssh-agent ] && [ /dev/console -nt ~/.ssh-agent ]; then | |
rm -f ~/.ssh-agent | |
echo "Deleted old agent environment file." | |
fi | |
if [ ! -f ~/.ssh-agent ]; then | |
echo "Starting agent." | |
ssh-agent > ~/.ssh-agent | |
fi | |
source ~/.ssh-agent > /dev/null 2>&1 | |
if ! ssh-add -l > /dev/null 2>&1 ; then | |
ssh-add | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment