fix: read SSH settings from the active extension's section - #1060
Merged
Conversation
Windsurf/Devin and Antigravity forked open-remote-ssh and renamed the whole `remote.SSH` configuration section, so reading `remote.SSH.configFile` silently missed a custom config file on those editors and the workspace host was written to `~/.ssh/config`, which they never read. Map each known Remote-SSH extension to the sections it consults and read the first non-empty value from those. Windsurf reads both `remote.devinSSH` and `remote.windsurfSSH`, preferring the new name.
Member
|
@EhabY should we also start respecting ting It is not part of this, but just came to mind while reading it. |
Collaborator
Author
|
Oh yes we probably should, the only difference now is that the app name has been changed from Windsurf to Devin, so |
EhabY
added a commit
that referenced
this pull request
Aug 3, 2026
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
added a commit
that referenced
this pull request
Aug 4, 2026
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
added a commit
that referenced
this pull request
Aug 5, 2026
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
added a commit
that referenced
this pull request
Aug 6, 2026
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
added a commit
that referenced
this pull request
Aug 11, 2026
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
added a commit
that referenced
this pull request
Aug 11, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
getSshConfigPath()readremote.SSH.configFileunconditionally. Two of the five Remote-SSH implementations we support forkedopen-remote-sshand renamed the entire settings section, so that key does not exist for them:ms-vscode-remote.remote-sshremote.SSHanysphere.remote-ssh(Cursor)remote.SSHjeanp413.open-remote-sshremote.SSHcodeium.windsurf-remote-openssh(Windsurf/Devin)remote.devinSSH, legacyremote.windsurfSSHgoogle.antigravity-remote-opensshremote.antigravitySSHVerified by reading the installed bundles: Antigravity resolves
getConfiguration("remote.antigravitySSH").get("configFile")and contributes onlyremote.antigravitySSH.*; Windsurf uses a dual-read helper overremote.devinSSHandremote.windsurfSSH, preferring the former. Neither referencesremote.SSHanywhere.So on Antigravity or Windsurf with a custom SSH config file configured, we wrote the workspace host block into
~/.ssh/configwhile the extension launchedssh -F <their file>— host not found, connection fails.Change
SETTING_SECTIONSmaps each known extension to the sections it consults, andgetRemoteSshSetting()returns the first non-empty value across them. Unknown/absent extension falls back toremote.SSH.