Skip to content

Instantly share code, notes, and snippets.

@sirkkalap
Forked from im007boy/gist:4079756
Last active October 8, 2015 16:04
Show Gist options
  • Save sirkkalap/5b1ac4c3619232533dcc to your computer and use it in GitHub Desktop.
Save sirkkalap/5b1ac4c3619232533dcc to your computer and use it in GitHub Desktop.
ssh-agent
## from https://gist.github.com/sirkkalap/5b1ac4c3619232533dcc
SSHAGENT=/usr/bin/ssh-agent
SSHAGENTARGS="-s"
eval `$SSHAGENT $SSHAGENTARGS`
trap "kill $SSH_AGENT_PID" 0
ids=$(echo $HOME/.ssh/id* | sed -E "s/ ?[^ ]+\.pub//g")
for id in $ids; do
ssh-add $id
done
ssh-add -l
#if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
#fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment