From 3793f39c34541fdcc7ba34a427cc984ae156237a Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Sat, 31 Dec 2011 22:11:01 +0200 Subject: [PATCH] bashrc & zshrc: SSHGuard and multiple keys are trying to make people crazy. But what if ssh-add is always told to remove keys, before adding new ones? By the way, Happy new year 2012 (even if it's only 22:12), because this is my last commit tonight, unles people at IRC get me to commit something else ;) --- bashrc | 3 +++ zshrc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bashrc b/bashrc index 32d5f5ce..911587cf 100755 --- a/bashrc +++ b/bashrc @@ -307,6 +307,9 @@ alias KILL="killall -KILL " # For locally rsync copying folder1 to folder2. alias rsync-folder="rsync -azvv " +# SSHGuard seems to prefer users to run this always when connecting with keys in ssh-agent... +alias ssh-add="\ssh-add -D && \ssh-add " + # Allow custom aliases to be put in .aliases or .bash_aliases . # .aliases diff --git a/zshrc b/zshrc index 70999cb2..acb982a5 100755 --- a/zshrc +++ b/zshrc @@ -250,6 +250,9 @@ alias KILL="killall -KILL " # For locally rsync copying folder1 to folder2. alias rsync-folder="rsync -azvv " +# SSHGuard seems to prefer users to run this always when connecting with keys in ssh-agent... +alias ssh-add="\ssh-add -D && \ssh-add " + # Allow custom aliases to be put in .aliases or .zsh_aliases . # .aliases