ssh-agent: on start, import all SSH keys

This commit is contained in:
Vincent Bernat 2022-10-18 00:32:47 +02:00
parent adfce79ac2
commit 370270b1ca
2 changed files with 13 additions and 2 deletions

10
bin/ssh-add Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
export SSH_ASKPASS=/usr/bin/ssh-askpass
ssh-add -l > /dev/null || ssh-add $(
sed -n 's/^ *IdentityFile ~\/\([^ ]*\).*/\1/p' ~/.ssh/config ~/.ssh/*/config \
| sort \
| uniq
)
ssh-add -l