Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bashrc: Reorganize logic for cache_ssh_key()

One should be able to add multiple keys to be associated with
a single $SSH_AUTH_SOCK.
  • Loading branch information...
commit 9a251ca1760570bd609b0dc6739bc68aaf22a911 1 parent d7b1e8d
@tommystanton authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 .bashrc
View
5 .bashrc
@@ -8,14 +8,15 @@ fi
# User specific aliases and functions
cache_ssh_key () {
- # Cache password for private key
if [ -z "$SSH_AUTH_SOCK" ]; then
eval $(/usr/bin/ssh-agent -s)
- /usr/bin/ssh-add "$@"
trap "kill $SSH_AGENT_PID" 0 && \
echo "ssh-agent (PID ${SSH_AGENT_PID}) will be killed" \
"when this shell is exited"
fi
+
+ # Cache password for private key
+ /usr/bin/ssh-add "$@"
}
# Use perlbrew for a locally-installed perl (see
Please sign in to comment.
Something went wrong with that request. Please try again.