Load ssh key if missing

This commit is contained in:
Anthony Rose 2020-02-05 15:38:15 +00:00
parent 722db3814a
commit 6987a48f8b

View file

@ -243,6 +243,10 @@ case $- in
;; ;;
esac esac
if test -S $SSH_AUTH_SOCK && test -r $HOME/.ssh/id_rsa && [ $(ssh-add -l | grep "$HOME/.ssh/id_rsa" | wc -l) = 0 ]; then
ssh-add $HOME/.ssh/id_rsa
fi
if [ -r $HOME/.shrc.$(hostname -s) ]; then if [ -r $HOME/.shrc.$(hostname -s) ]; then
. $HOME/.shrc.$(hostname -s) . $HOME/.shrc.$(hostname -s)
fi fi