Add helper function to add all ssh private keys to agent

pull/1400/head
Arunvel Sriram 2019-07-27 22:50:08 +05:30
parent 3d65e8710d
commit ef31690b07
1 changed files with 7 additions and 0 deletions

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
}