Skip to content

Instantly share code, notes, and snippets.

@fty4
Created December 18, 2020 07:53
Show Gist options
  • Save fty4/9aba9b4e09a2b0676e552414803215ca to your computer and use it in GitHub Desktop.
Save fty4/9aba9b4e09a2b0676e552414803215ca to your computer and use it in GitHub Desktop.
ssh_keys=/home/ml/.ssh_hidden/id_rsa,/home/ml/.ssh_hidden/id_rsa_other
for ssh_key in $(echo $ssh_keys | sed "s/,/ /g")
do
if ! ssh-add -l | grep "$ssh_key" > /dev/null; then
ssh-add "$ssh_key"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment