run keychain for all keys in ~/.ssh

This commit is contained in:
Sami Samhuri 2012-04-21 14:36:59 -07:00
parent c076164572
commit f2cf49ff88

View file

@ -377,14 +377,8 @@ compinit
# 10. SSH Keychain # 10. SSH Keychain
# ================ # ================
# OS X includes keychain now, cool.
if command_exists keychain; then if command_exists keychain; then
if [[ -f ~/.ssh/id_rsa ]]; then keychain --nogui ~/.ssh/id_rsa*~*.pub
keychain --nogui ~/.ssh/id_rsa
fi
if [[ -f ~/.ssh/id_rsa-dreamhost ]]; then
keychain --nogui ~/.ssh/id_rsa-dreamhost
fi
KEYCHAINFILE="$HOME/.keychain/$(hostname)-sh" KEYCHAINFILE="$HOME/.keychain/$(hostname)-sh"
if [[ -f $KEYCHAINFILE ]]; then if [[ -f $KEYCHAINFILE ]]; then
source $KEYCHAINFILE >/dev/null source $KEYCHAINFILE >/dev/null