Re: Multiple private keys



efair wrote:
Hi,

I've been using ssh to access a remote server (server A) from my
workstation. The admin of server A do not provide me a password, he
prefers to use "shared secrets" for access control -- he creates a
userid for me, generates a key pair, puts the public key in ~/.ssh/
authorized_keys, provides me the userid and the private key; I copy
the private key into id.rsa on my workstation, and I then ssh into
server A. No password prompt appears.

Now I need to access another server (server B) from my workstation.
The admin of server B also uses the "shared secrets". The admins
won't use the same keys.

Is there any way to switch back and forth between the two private keys
on my workstation, short of replacing the id_rsa file every time I
want to access A or B?

Yes, of course. You can create an "ssh-agent" that stores both keys dynamically, or you can tell your SSH client to use a specific key to make its connections. How you do this depends on your client, but Putty and Pageant for Windows has nice support for both, and various UNIX/Linux tools like "keychain" work quite well.
.