Skip to content

fix: handle workspace.agent and agent.workspace.owner in coder ssh (cherry-pick #18093) #18096

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

Merged
merged 1 commit into from
May 29, 2025

Conversation

gcp-cherry-pick-bot[bot]
Copy link

Cherry-picked fix: handle workspace.agent and agent.workspace.owner in coder ssh (#18093)

Closes #18088.

The linked issue is misleading -- coder config-ssh continues to support the coder. prefix. The reason the command
ssh coder.workspace.agent fails is because coder ssh workspace.agent wasn't supported. This PR fixes that.

We know we used to support workspace.agent, as this is what we recommend in the Web UI:
image

This PR also adds support for coder ssh agent.workspace.owner, such that after running coder config-ssh, a command like

ssh agent.workspace.owner.coder

works, even without Coder Connect running. This is done for parity with an existing workflow that uses ssh workspace.coder, which either uses Coder Connect if available, or the CLI.

…sh` (#18093)

Closes #18088.

The linked issue is misleading -- `coder config-ssh` continues to support the `coder.` prefix. The reason the command
`ssh coder.workspace.agent` fails is because `coder ssh workspace.agent` wasn't supported. This PR fixes that.

We know we used to support `workspace.agent`, as this is what we recommend in the Web UI:
![image](https://github.com/user-attachments/assets/702bbbc7-c586-4947-98a6-4508a481280b)

This PR also adds support for `coder ssh agent.workspace.owner`, such that after running `coder config-ssh`, a command like
```
ssh agent.workspace.owner.coder
```
works, even without Coder Connect running. This is done for parity with an existing workflow that uses `ssh workspace.coder`, which either uses Coder Connect if available, or the CLI.
@matifali matifali requested a review from ethanndickson May 29, 2025 07:53
@matifali matifali merged commit a9b1ccd into release/2.22 May 29, 2025
39 of 41 checks passed
@matifali matifali deleted the cherry-pick-97d2d0-release/2.22 branch May 29, 2025 08:26
@github-actions github-actions bot locked and limited conversation to collaborators May 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants