ssh-add add all private keys in .ssh directory
Slightly convoluted, but:
for possiblekey in ${HOME}/.ssh/id_*; do
if grep -q PRIVATE "$possiblekey"; then
ssh-add "$possiblekey"
fi
done
You can also add all of your keys to your ~/.ssh/config
each in their own IdentityFile
directive outside of a Host
directive:
# Global SSH configurations here will be applied to all hosts
IdentityFile ~/.ssh/id_dsa
IdentityFile ~/.ssh/id_project1
IdentityFile ~/.ssh/id_someotherkey
Host somespecifichost.example.com
IdentityFile ~/.ssh/id_specifichostonlykey
The latter, honestly-better, method has the added perk of not suddenly picking up a new key that you've added without you explicitly adding it to the "keyring" as it were.