You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support all accumulating SSH config options instead of re-implementing override behavior #695
Currently we manually handle SSH config merging, but this requires re-implementing SSH's "first match wins" override behavior ourselves.
Proposed approach
Instead of manual merging, let the SSH client handle it natively:
Place override configs first in the file (SSH uses "first match wins")
Keys without values (for non-accumulating options) can be used to remove the entry if we still want to maintain that behavior
For accumulating options, pass entries as-is from both configs without combining them
This keeps files leaner while avoiding custom override logic.
Accumulating SSH options to support
These options accumulate across multiple declarations rather than following "first match wins":
Option
Behavior
IdentityFile
Tried in sequence
CertificateFile
Tried in sequence
SetEnv
All values sent to server
SendEnv
Accumulates (prefix with - to clear)
LocalForward
Multiple tunnels
RemoteForward
Multiple tunnels
DynamicForward
Multiple SOCKS proxies
Additionally, these use space-separated values: GlobalKnownHostsFile, UserKnownHostsFile, PermitRemoteOpen, CanonicalDomains.
Respect a custom config-ssh file location
Updated on 2026-11-25 (from #425): parseCoderSshOptions only reads # :ssh-option= lines from the Remote-SSH config file or ~/.ssh/config. It should also honor CODER_SSH_CONFIG_FILE (coder config-ssh --ssh-config-file) so options written to a custom location are picked up.
Activity