From: Mike Frysinger Date: Sun, 15 Jun 2014 01:20:04 +0000 (-0400) Subject: make sure keys are 600 before adding X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=2b7056d78aedd5083037de7fb728e292f483a760;p=home.git make sure keys are 600 before adding --- diff --git a/.bash_profile b/.bash_profile index 0a8665f..4ad5a34 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,5 +1,9 @@ if type -P keychain >/dev/null ; then - keychain -q $(find ~/.ssh/ -type f '(' -name 'id_*' -a '!' -name '*.pub' ')') + ( + set -- $(find ~/.ssh/ -maxdepth 1 -type f '(' -name 'id_*' -a '!' -name '*.pub' ')') + chmod go-rwx "$@" + keychain -q "$@" + ) fi [[ -f ~/.bashrc ]] && . ~/.bashrc stty -tostop