Check for the new SSH key

This commit is contained in:
Anthony Rose 2020-12-11 22:27:42 +00:00
parent 62221b6f61
commit d57c8086d5

View file

@ -325,8 +325,8 @@ 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"
if test -S "$SSH_AUTH_SOCK" && test -r "$HOME/.ssh/id_ed25519" && [ $(ssh-add -l | grep "$HOME/.ssh/id_ed25519" | wc -l) = 0 ]; then
ssh-add "$HOME/.ssh/id_ed25519"
fi
if [ -r $HOME/.shrc.$(hostname -s 2>/dev/null || cat /etc/hostname) ]; then