8000 docs: update SSH command format to use suffix (#18085) · coder/coder@cba69f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit cba69f3

Browse files
authored
docs: update SSH command format to use suffix (#18085)
Refactor the workspace SSH command syntax across the project to use the "workspace.coder" format instead of "coder.workspace". This standardizes the SSH host entries for better consistency and clarity. This is a follow-up from #17445 and recommends using the suffix-based format for all new Coder versions. <img width="418" alt="image" src="https://github.com/user-attachments/assets/3893f840-9ce1-4803-a013-736068feb328" />
1 parent fd6981e commit cba69f3

File tree

9 files changed

+12
-10
lines changed

9 files changed

+12
-10
lines changed

cli/configssh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func (r *RootCmd) configSSH() *serpent.Command {
235235
cmd := &serpent.Command{
236236
Annotations: workspaceCommand,
237237
Use: "config-ssh",
238-
Short: "Add an SSH Host entry for your workspaces \"ssh coder.workspace\"",
238+
Short: "Add an SSH Host entry for your workspaces \"ssh workspace.coder\"",
239239
Long: FormatExamples(
240240
Example{
241241
Description: "You can use -o (or --ssh-option) so set SSH options to be used for all your workspaces",

cli/testdata/coder_--help.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SUBCOMMANDS:
1818
completion Install or update shell completion scripts for the
1919
detected or chosen shell.
2020
config-ssh Add an SSH Host entry for your workspaces "ssh
21-
coder.workspace"
21+
workspace.coder"
2222
create Create a workspace
2323
delete Delete a workspace
2424
dotfiles Personalize your workspace by applying a canonical

cli/testdata/coder_config-ssh_--help.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ coder v0.0.0-devel
33
USAGE:
44
coder config-ssh [flags]
55

6-
Add an SSH Host entry for your workspaces "ssh coder.workspace"
6+
Add an SSH Host entry for your workspaces "ssh workspace.coder"
77

88
- You can use -o (or --ssh-option) so set SSH options to be used for all
99
your

docs/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@
10971097
},
10981098
{
10991099
"title": "config-ssh",
1100-
"description": "Add an SSH Host entry for your workspaces \"ssh coder.workspace\"",
1100+
"description": "Add an SSH Host entry for your workspaces \"ssh workspace.coder\"",
11011101
"path": "reference/cli/config-ssh.md"
11021102
},
11031103
{

docs/reference/cli/config-ssh.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/cli/index.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/tutorials/testing-templates.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ jobs:
103103
- name: Create a test workspace and run some example commands
104104
run: |
105105
coder create -t $TEMPLATE_NAME --template-version ${{ steps.name.outputs.version_name }} test-${{ steps.name.outputs.version_name }} --yes
106-
coder config-ssh --yes
107106
# run some example commands
108-
ssh coder.test-${{ steps.name.outputs.version_name }} -- make build
107+
coder ssh test-${{ steps.name.outputs.version_name }} -- make build
109108
110109
- name: Delete the test workspace
111110
if: always()

site/src/modules/resources/AgentRow.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ export const AgentRow: FC<AgentRowProps> = ({
215215
<AgentSSHButton
216216
workspaceName={workspace.name}
217217
agentName={agent.name}
218+
workspaceOwnerUsername={workspace.owner_name}
218219
/>
219220
)}
220221
{proxy.preferredWildcardHostname !== "" &&

site/src/modules/resources/SSHButton/SSHButton.tsx

Lines changed: 4 additions & 2 deletions
< 81E4 tr class="diff-line-row">
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ import { docs } from "utils/docs";
2222
interface AgentSSHButtonProps {
2323
workspaceName: string;
2424
agentName: string;
25+
workspaceOwnerUsername: string;
2526
}
2627

2728
export const AgentSSHButton: FC<AgentSSHButtonProps> = ({
2829
workspaceName,
2930
agentName,
31+
workspaceOwnerUsername,
3032
}) => {
3133
const paper = useClassName(classNames.paper, []);
3234
const { data } = useQuery(deploymentSSHConfig());
33-
const sshPrefix = data?.hostname_prefix;
35+
const sshSuffix = data?.hostname_suffix;
3436

3537
return (
3638
<Popover>
@@ -54,7 +56,7 @@ export const AgentSSHButton: FC<AgentSSHButtonProps> = ({
5456
/>
5557
<SSHStep
5658
helpText="Connect to the agent:"
57-
codeExample={`ssh ${sshPrefix}${workspaceName}.${agentName}`}
59+
codeExample={`ssh ${workspaceName}.${agentName}.${workspaceOwnerUsername}.${sshSuffix}`}
5860
/>
5961
</Stack>
6062
</ol>

0 commit comments

Comments
 (0)
0