diff --git a/roles/home-cli/files/shrc b/roles/home-cli/files/shrc index 12a0a16..4ddf0f9 100644 --- a/roles/home-cli/files/shrc +++ b/roles/home-cli/files/shrc @@ -243,6 +243,10 @@ case $- in ;; 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 . $HOME/.shrc.$(hostname -s) fi