From 2b7056d78aedd5083037de7fb728e292f483a760 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 14 Jun 2014 21:20:04 -0400 Subject: [PATCH] make sure keys are 600 before adding --- .bash_profile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.5