Skip to content

fix: ignore the SSH config file setting where ssh never reads it - #1063

Closed
EhabY wants to merge 1 commit into
mainfrom
fix/ssh-config-file-honored
Closed

fix: ignore the SSH config file setting where ssh never reads it#1063
EhabY wants to merge 1 commit into
mainfrom
fix/ssh-config-file-honored

Conversation

@EhabY

@EhabY EhabY commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #1060, which shipped an incorrect premise.

Problem

#1060 assumed every Remote-SSH extension connects through the config file its configFile setting names. Two of them do not.

Antigravity and Windsurf/Devin spawn ssh as -v -T [-o RemoteCommand=none] -D <port> <dest> bash -sno -F anywhere in either bundle (the only -F token is a grep -F in their remote install script). Their getSSHConfigPath() feeds the host tree, the file watcher and the "Open SSH Configuration File" command, and nothing else. ssh therefore reads its own default ~/.ssh/config no matter what remote.antigravitySSH.configFile or remote.devinSSH.configFile says.

So after #1060, a user who set one of those got the workspace host written to a file the connection never reads, and the connection failed. Before #1060 that user had a cosmetic mismatch only. The same applies to a stale remote.SSH.configFile synced in from VS Code, which those editors also never pass to ssh.

Change

Ignore the setting on those two extensions and read remote.SSH.configFile everywhere else, because the three extensions that genuinely connect through it all use that name:

Extension Connects through the setting?
ms-vscode-remote.remote-ssh yes, passes it with -F
anysphere.remote-ssh yes, passes it with -F
jeanp413.open-remote-ssh yes, parses the file itself (bundles ssh2, never runs ssh)
google.antigravity-remote-openssh no
codeium.windsurf-remote-openssh no

That makes #1060's per-extension section map inert, so it is removed: the renamed sections belong exclusively to extensions we now skip. The rule is documented in CONTRIBUTING.md next to the SSH config flow.

Known cosmetic trade-off: on those two editors, a user pointing the setting elsewhere will not see Coder workspaces in the extension's host tree. Their own hosts in that file are equally unreachable for the same upstream reason, so this restores the pre-#1060 behaviour rather than introducing a new gap.

Testing

getRemoteSshConfigFile is covered for the three honouring extensions, for both ignoring ones (including with a stale remote.SSH.configFile present), for no extension installed, and for nothing configured. Full suite passes, plus lint and typecheck.

🤖 Generated with Claude Code

Antigravity and Windsurf/Devin renamed the setting to
remote.antigravitySSH.configFile and remote.devinSSH.configFile, then
spawn ssh without -F, so ssh reads ~/.ssh/config no matter what any of
them say. The setting only feeds their own host tree.

Honoring it, or a stale remote.SSH.configFile synced in from another
editor, writes the workspace host to a file the connection never reads.
Ignore it on those two and keep reading remote.SSH.configFile elsewhere:
Microsoft's extension and Cursor's fork pass it to ssh with -F, and
VSCodium's fork parses the file itself instead of running ssh.

This drops the per-extension section map from #1060: the three
extensions that do connect through the setting all read remote.SSH.
@EhabY

EhabY commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Folded into #1061.

@EhabY EhabY closed this Aug 3, 2026
@EhabY
EhabY deleted the fix/ssh-config-file-honored branch August 3, 2026 23:34
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.

1 participant