Skip to content

Instantly share code, notes, and snippets.

@jef79m
Created December 8, 2017 01:03
Show Gist options
  • Save jef79m/adaf2e3aa09d363fb7482389c01ded07 to your computer and use it in GitHub Desktop.
Save jef79m/adaf2e3aa09d363fb7482389c01ded07 to your computer and use it in GitHub Desktop.
Script to easily switch between private keys
#!/bin/bash
select keyname in `grep -rl "BEGIN RSA PRIVATE KEY" ~/.ssh`;
do
ssh-add -D
ssh-add $keyname
break
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment