-
Notifications
You must be signed in to change notification settings - Fork 35
feat: Align remote ssh naming with coder cli #75
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Liorba, I'm a bit confused by this contribution. We don't want coder config-ssh to interact with the VS Code extension at all, because they are truly separate experiences.
Could you explain more of the problem this solves?
| // when opening a workspace unless explicitly specified. | ||
| const remoteAuthority = `ssh-remote+${Remote.Prefix}${workspaceOwner}--${workspaceName}` | ||
| // search for workspace name in the ssh config | ||
| const remoteAuthority = `ssh-remote+${Remote.Prefix}.${workspaceName}.main` //main is the default agent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main is not the default name for an agent. It can be anything that a user defines!
| // if (!authorityParts[1].startsWith(Remote.Prefix)) { | ||
| // return | ||
| // } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be checked, otherwise Coder will activate on any remote SSH connection, which will cause errors to appear on non-Coder connections.
|
The reason for that is the ability to use the vscode extension to connect to workspaces that was configured using the config ssh option. |
Currently as Kyle mentioned, the cli and the vscode extension are intentionally writing different Keeping these distinct from each other means we can define custom behavior of the ssh, which is currently just
In the extension, do you not just select a workspace? You do not select from a set of configured ssh hosts. You choose the workspace itself. So the ssh config logic is never exposed to the user. If you are using VSCode-Remote instead, and selecting the ssh host, then you are not using the Coder extension. In that case, you can select any config-ssh host you would like from either configuration block. I am curious what your workflow is that the two different ssh host namings are being presented to the user. |
009bca7 to
bcf5486
Compare
05e11c3 to
d18614d
Compare
|
Closing as stale, but happy to reopen and take another look if this becomes active again. |


coder's cli tool allow users to configure ssh conection to their remote hosts.
as part of it's configuration, he generate ssh config host to the dedicated user's machine.
The patten used by the cli tool, is not align with the one user by the vscode extension.
This mismatch between coder cli and the vscode extension, cause errors when trying to connect to remote host.
Key differences:
coder.<workspace-name>.<agent>. currently the default agent is mainthe vscode extension is expecting the pattern
coder-vscode--<workspace-owner>--<workspace-name>--<agent?>coderThis PR is set to close the gap between the 2 and make sure hosts created by the cli can be connected from the vscode extension