Add helper function to add all ssh private keys to agent

This commit is contained in:
Arunvel Sriram
2019-07-27 22:50:08 +05:30
parent 3d65e8710d
commit ef31690b07

View File

@@ -17,3 +17,10 @@ function sshlist() {
awk '$1 ~ /Host$/ {for (i=2; i<=NF; i++) print $i}' ~/.ssh/config
}
function ssh-add-all() {
about 'add all ssh private keys to agent'
group 'ssh'
grep -slR "PRIVATE" ~/.ssh | xargs ssh-add
}