I have two public keys, one for some servers and one for others. How do I specify which key to use when connecting to a server?
Assuming you're on a Unix/Linux environment, you can create a config file in your ~/.ssh/ directory.
The config file allows you to establish the parameters to use for each host; so, for example:
Note that host1 and host2 can also be not hostnames, but rather labels to identify a server.
Now you can log onto the to hosts with: