Tell git which private key to use
Posted
by
jrdioko
on Super User
See other posts from Super User
or by jrdioko
Published on 2011-01-12T18:20:31Z
Indexed on
2011/01/12
18:55 UTC
Read the original article
Hit count: 366
ssh
has the -i
option to tell it which private key file to use when authenticating:
-i identity_file
Selects a file from which the identity (private key) for RSA or DSA
authentication is read. The default is ~/.ssh/identity for protocol ver-
sion 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol version 2. Iden-
tity files may also be specified on a per-host basis in the configuration
file. It is possible to have multiple -i options (and multiple identities
specified in configuration files).
Is there a similar way to tell git
which private key file to use when on a system with multiple private keys in the .ssh
directory?
© Super User or respective owner