-
-
Save sirkkalap/5b1ac4c3619232533dcc to your computer and use it in GitHub Desktop.
ssh-agent
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
## 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