Fix bash SSH check
This commit is contained in:
parent
72837fb596
commit
ef43f66137
1 changed files with 4 additions and 1 deletions
|
@ -262,7 +262,10 @@ case "$-" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -S "$SSH_AUTH_SOCK" ] && [ -r "$HOME/.ssh/id_ed25519" ] && [ $(ssh-add -l | egrep "acp-(home|work) \(ED25519\)" | wc -l) = 0 ]
|
if [ -S "$SSH_AUTH_SOCK" ] \
|
||||||
|
&& [ -r "$HOME/.ssh/id_ed25519" ] \
|
||||||
|
&& [ -r "$HOME/.ssh/id_ed25519.pub" ] \
|
||||||
|
&& [ $(ssh-add -l | grep "$(ssh-keygen -l -f "$HOME/.ssh/id_ed25519.pub")" | wc -l) = 0 ]
|
||||||
then
|
then
|
||||||
ssh-add "$HOME/.ssh/id_ed25519"
|
ssh-add "$HOME/.ssh/id_ed25519"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue