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

Add support for %h and %r escape characters in IdentityFile for SSH. #10343

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

mannjani
Copy link
Contributor

@mannjani mannjani commented Mar 5, 2025

See section "IdentityFile" on https://linux.die.net/man/5/ssh_config for details.

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.

@Eugeny Eugeny merged commit 4a515d9 into Eugeny:master Mar 5, 2025
10 checks passed
@Eugeny
Copy link
Owner

Eugeny commented Mar 5, 2025

Thank you!

@Eugeny
Copy link
Owner

Eugeny commented Mar 5, 2025

@all-contributors add @mannjani for code

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

Successfully merging this pull request may close these issues.

2 participants