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.
In addition to
SSH_DEFAULT_OPTIONS
, there should also be an optionSSH_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.