[conspire] ssh-keygen and multiple DSA keys in ~/.ssh/id_dsa.pub

Sean Neakums sneakums at zork.net
Fri Feb 20 15:06:27 PST 2004

Daniel Gimpelevich <dgimpe01 at ccsf.edu> writes:

> Is it possible to generate more than one DSA key and have them both
> available at the same time? Ssh-keygen wants to overwrite the existing key
> to generate a second one. Could I just append to the existing keyfiles?  -DG

I believe you'll have to work with multiple key files.  You can use
the -f option to tell ssh-keygen where to write the private key.  The
public key will be written to a file of the same name with .pub

In order make use multiple keys, you can use the -i option to ssh to
select the private key to use on a host-by-host basis, use
~/.ssh/config's IdentifyFile option to automate this (see the
ssh_config man page if you don't currently use this file for details
on how to write one), or else you can set up ssh-agent and ssh-add all
your keys.  In this last case, when you attempt to connect to a host,
the correct key will be selected automatically.

More information about the conspire mailing list