I have already set up public/private key pairs for ssh login on a server A without password. The problem is that I also want to log on another server B without password. I searched a little online. It looks like many tutorial just applies in the case that there is one server to log in. Following directly that will erase my setting for server A. So how can I add another public/private key pair for my server B, so that I can log in without typing password every time? Thanks!
You could just add the public key to the authorized_keys file on server B, then the same key would be used to log into server A or Server B.
Alternately, you can specify the private key to use when authenticating to a server:
ssh -i /path/to/id_rsa user@hostB
Ideally, you'd have a single private key, and add the corresponding public key to all the servers you wished to login to (all using the same private key.)