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

An option for specifying global SSH options #30

Open
s1kx opened this issue Aug 25, 2016 · 1 comment
Open

An option for specifying global SSH options #30

s1kx opened this issue Aug 25, 2016 · 1 comment

Comments

@s1kx
Copy link

s1kx commented Aug 25, 2016

In addition to SSH_DEFAULT_OPTIONS, there should also be an option SSH_GLOBAL_OPTIONS and/or a way to merge the identity config file with a global ssh config (e.g. ~/.ssh/config).

This is necessary to separate global options (such as UseRoaming/ServerAliveInterval/ServerAliveCountMax) from default options, which are semantically different and could be easy to confuse with one another. That's not to mention that repeating the same options for 10 identities is unidiomatic and prone to errors.

This issue especially affects users that use identity-specific configs, as otherwise you could simply place your global options in a Host * block in ~/.ssh/config.

One idiomatic way of solving this would be to create an ephemeral file to be used as the -F <config> argument. ssh-ident could append ~/.ssh/identities/%i/config and ~/.ssh/config to a new file (e.g. ~/.ssh/session-configs/%i) and pass that config file to ssh with -F. In order to make sure the file is up to date, it could use the timestamps of the identity config, the global config and compare it to the session-config to determine if it needs to be regenerated.

@maddes-b
Copy link

Have a look at my fork at https://github.com/maddes-b/ssh-ident
There I extended SSH_OPTIONS to specify parameters per identiy and/or binary.

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

No branches or pull requests

2 participants