Closed robertDouglass closed 10 years ago
For example: let's say you have a dozen public/private keypairs, and you use one called platform_rsa.pub that is stored in the ~/development/.ssh folder on your machine; how do you tell the CLI that this is the key that is supposed to be used when authenticating you?
For example, the ssh command has this parameter:
-i identity_file Selects a file from which the identity (private key) for public key authentication is read. The default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa and ~/.ssh/id_rsa 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). ssh will also try to load certificate information from the filename obtained by appending -cert.pub to identity filenames.
This can not be done, and wrapping git
calls with ssh-agent
calls would not be nice.
One must add the key one wants to use to the ssh-agent
. People using multiple keys are used to that. Two solutions:
1) Add specific key to the SSH agent prior any command:
ssh-add /path/to/the/key
2) Strictly define host in ~/.ssh/config
, example for eu.platform.sh:
Host *.eu.platform.sh
IdentityFile /path/to/the/key
It seems that Platform is missing a flag to specify what public key to use? Or is it an undocumented feature?