702
268
ssh
has the -i
option to tell 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 version 1, and~/.ssh/id_rsa
and~/.ssh/id_dsa
for protocol version 2. Identity 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 on a system with multiple private keys in the ~/.ssh
directory?
3
See this question in StackOverflow as well.
– Flimm – 2015-05-08T09:46:13.6032
Also related http://serverfault.com/questions/194567/how-do-i-tell-git-for-windows-where-to-find-my-private-rsa-key
– Machavity – 2016-06-28T14:51:09.390