Is it possible to have multiple SSH key in a single client, and let ssh choose the right one automatically?
You can have different private keys in different files and specify all of them in
~/.ssh/config using separate
IdentityFile values (or using
-i option while running
ssh). They would be tried in sequence (checkout
man 5 ssh_config).
If you are using
ssh-agent though, you might have to tell the agent about the multiple keys you have using
Selects a file from which the identity (private key) for public key authentication is read. The default is
~/.ssh/identityfor protocol version 1, and
~/.ssh/id_rsafor protocol version 2. Identity files may also be specified on a per-host basis in the configuration file. It is possible to have multiple
-ioptions (and multiple identities specified in configuration files). ssh will also try to load certificate information from the filename obtained by appending
-cert.pubto identity filenames.
-i for each identity, or use several
IdentityFile lines in you