A collection of small handy ssh scripts
These scripts are primarily aimed at OSX but are easily ported to other systems.
When using ssh-agent, it might be handy to enter all the passwords for your ssh keys only once (for example when booting up the computer), instead of looking up all the passwords when needed.
#/bin/bash
ssh-add ~/.ssh/id_ed25519
ssh-add ~/.ssh/id_rsa
# .. etcetera
chmod +x ~/ssh-add
Now, you can easily enter all your ssh keys in one go. Time saver!
Changing servers and keys, and having annoying messages like:
Offending key for IP in /Users/***/.ssh/known_hosts:114
Matching host key in /Users/***/.ssh/known_hosts:126
?
Easily remove the offending line from known hosts by:
LINE=232
sed -i -e "${LINE}d" ~/.ssh/known_hosts