diff --git a/cli/testdata/coder_server_--help.golden b/cli/testdata/coder_server_--help.golden
index 0c3af0a948..c0231d9129 100644
--- a/cli/testdata/coder_server_--help.golden
+++ b/cli/testdata/coder_server_--help.golden
@@ -215,9 +215,6 @@ Clients include the Coder CLI, Coder Desktop, IDE extensions, and the web UI.
commas.Using this incorrectly can break SSH to your deployment, use
cautiously.
- --ssh-hostname-prefix string, $CODER_SSH_HOSTNAME_PREFIX (default: coder.)
- The SSH deployment prefix is used in the Host of the ssh config.
-
--web-terminal-renderer string, $CODER_WEB_TERMINAL_RENDERER (default: canvas)
The renderer to use when opening a web terminal. Valid values are
'canvas', 'webgl', or 'dom'.
diff --git a/cli/testdata/server-config.yaml.golden b/cli/testdata/server-config.yaml.golden
index d19549f6eb..e5a6b6427e 100644
--- a/cli/testdata/server-config.yaml.golden
+++ b/cli/testdata/server-config.yaml.golden
@@ -523,7 +523,8 @@ disableWorkspaceSharing: false
# These options change the behavior of how clients interact with the Coder.
# Clients include the Coder CLI, Coder Desktop, IDE extensions, and the web UI.
client:
- # The SSH deployment prefix is used in the Host of the ssh config.
+ # Deprecated: use workspace-hostname-suffix instead. The SSH deployment prefix is
+ # used in the Host of the ssh config.
# (default: coder., type: string)
sshHostnamePrefix: coder.
# Workspace hostnames use this suffix in SSH config and Coder Connect on Coder
diff --git a/codersdk/deployment.go b/codersdk/deployment.go
index 4dcecb58c7..6b450058e6 100644
--- a/codersdk/deployment.go
+++ b/codersdk/deployment.go
@@ -1549,6 +1549,17 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
Group: &deploymentGroupTelemetry,
YAML: "enable",
}
+ workspaceHostnameSuffix := serpent.Option{
+ Name: "Workspace Hostname Suffix",
+ Description: "Workspace hostnames use this suffix in SSH config and Coder Connect on Coder Desktop. By default it is coder, resulting in names like myworkspace.coder.",
+ Flag: "workspace-hostname-suffix",
+ Env: "CODER_WORKSPACE_HOSTNAME_SUFFIX",
+ YAML: "workspaceHostnameSuffix",
+ Group: &deploymentGroupClient,
+ Value: &c.WorkspaceHostnameSuffix,
+ Hidden: false,
+ Default: "coder",
+ }
opts := serpent.OptionSet{
{
Name: "Access URL",
@@ -2973,26 +2984,17 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
},
{
Name: "SSH Host Prefix",
- Description: "The SSH deployment prefix is used in the Host of the ssh config.",
+ Description: "Deprecated: use workspace-hostname-suffix instead. The SSH deployment prefix is used in the Host of the ssh config.",
Flag: "ssh-hostname-prefix",
Env: "CODER_SSH_HOSTNAME_PREFIX",
YAML: "sshHostnamePrefix",
Group: &deploymentGroupClient,
Value: &c.SSHConfig.DeploymentName,
- Hidden: false,
+ Hidden: true,
Default: "coder.",
+ UseInstead: serpent.OptionSet{workspaceHostnameSuffix},
},
- {
- Name: "Workspace Hostname Suffix",
- Description: "Workspace hostnames use this suffix in SSH config and Coder Connect on Coder Desktop. By default it is coder, resulting in names like myworkspace.coder.",
- Flag: "workspace-hostname-suffix",
- Env: "CODER_WORKSPACE_HOSTNAME_SUFFIX",
- YAML: "workspaceHostnameSuffix",
- Group: &deploymentGroupClient,
- Value: &c.WorkspaceHostnameSuffix,
- Hidden: false,
- Default: "coder",
- },
+ workspaceHostnameSuffix,
{
Name: "SSH Config Options",
Description: "These SSH config options will override the default SSH config options. " +
diff --git a/docs/reference/cli/server.md b/docs/reference/cli/server.md
index 312a9887f1..122e05fcd1 100644
--- a/docs/reference/cli/server.md
+++ b/docs/reference/cli/server.md
@@ -1198,17 +1198,6 @@ Disable password authentication. This is recommended for security purposes in pr
Specify a YAML file to load configuration from.
-### --ssh-hostname-prefix
-
-| | |
-|-------------|-----------------------------------------|
-| Type | string |
-| Environment | $CODER_SSH_HOSTNAME_PREFIX |
-| YAML | client.sshHostnamePrefix |
-| Default | coder. |
-
-The SSH deployment prefix is used in the Host of the ssh config.
-
### --workspace-hostname-suffix
| | |
diff --git a/enterprise/cli/testdata/coder_server_--help.golden b/enterprise/cli/testdata/coder_server_--help.golden
index 9734bbb298..45bb9b6277 100644
--- a/enterprise/cli/testdata/coder_server_--help.golden
+++ b/enterprise/cli/testdata/coder_server_--help.golden
@@ -216,9 +216,6 @@ Clients include the Coder CLI, Coder Desktop, IDE extensions, and the web UI.
commas.Using this incorrectly can break SSH to your deployment, use
cautiously.
- --ssh-hostname-prefix string, $CODER_SSH_HOSTNAME_PREFIX (default: coder.)
- The SSH deployment prefix is used in the Host of the ssh config.
-
--web-terminal-renderer string, $CODER_WEB_TERMINAL_RENDERER (default: canvas)
The renderer to use when opening a web terminal. Valid values are
'canvas', 'webgl', or 'dom'.