Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ssh_config multiple IdentityFile not supported #176

Open
mlrtime opened this issue Mar 11, 2020 · 4 comments
Open

[BUG] ssh_config multiple IdentityFile not supported #176

mlrtime opened this issue Mar 11, 2020 · 4 comments
Labels

Comments

@mlrtime
Copy link

mlrtime commented Mar 11, 2020

In my pillar I have

IdentityFile:
- ~/.ssh/id_rsa
- ~/.ssh/id_ed25519
- ~/.ssh/id_ecdsa

This Renders to:

Host *IdentityFile ~/.ssh/id_rsaIdentityFile ~/.ssh/id_ed25519IdentityFile ~/.ssh/id_ecdsa

It seems that ssh_config does not support multiple IdentityFile

@mlrtime mlrtime added the bug label Mar 11, 2020
@myii
Copy link
Member

myii commented Mar 11, 2020

@mlrtime Thanks for the report. Would you mind linking to the upstream OpenSSH documentation, showing us how this feature is supposed to be supported? The fix can then be linked back to the original sources, explaining why the change has been made.

@mlrtime
Copy link
Author

mlrtime commented Mar 16, 2020

From: https://linux.die.net/man/5/ssh_config

IdentityFile
Specifies a file from which the user's RSA or DSA authentication identity is read. The default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol version 2. Additionally, any identities represented by the authentication agent will be used for authentication.

The file name may use the tilde syntax to refer to a user's home directory or one of the following escape characters: '%d' (local user's home directory), '%u' (local user name), '%l' (local host name), '%h' (remote host name) or '%r' (remote user name).

It is possible to have multiple identity files specified in configuration files; all these identities will be tried in sequence.

@myii
Copy link
Member

myii commented Mar 16, 2020

@mlrtime Thanks. Can you put that into an actual example of what should be rendered in the file itself?

@mlrtime
Copy link
Author

mlrtime commented Mar 17, 2020

IdentityFile ~/.ssh/identity
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_dsa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants