mirror of
https://github.com/coder/coder.git
synced 2026-06-03 13:08:25 +00:00
cba69f3d98
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" />
118 lines
3.7 KiB
Markdown
Generated
118 lines
3.7 KiB
Markdown
Generated
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
|
# config-ssh
|
|
|
|
Add an SSH Host entry for your workspaces "ssh workspace.coder"
|
|
|
|
## Usage
|
|
|
|
```console
|
|
coder config-ssh [flags]
|
|
```
|
|
|
|
## Description
|
|
|
|
```console
|
|
- You can use -o (or --ssh-option) so set SSH options to be used for all your
|
|
workspaces:
|
|
|
|
$ coder config-ssh -o ForwardAgent=yes
|
|
|
|
- You can use --dry-run (or -n) to see the changes that would be made:
|
|
|
|
$ coder config-ssh --dry-run
|
|
```
|
|
|
|
## Options
|
|
|
|
### --ssh-config-file
|
|
|
|
| | |
|
|
|-------------|-------------------------------------|
|
|
| Type | <code>string</code> |
|
|
| Environment | <code>$CODER_SSH_CONFIG_FILE</code> |
|
|
| Default | <code>~/.ssh/config</code> |
|
|
|
|
Specifies the path to an SSH config.
|
|
|
|
### --coder-binary-path
|
|
|
|
| | |
|
|
|-------------|--------------------------------------------|
|
|
| Type | <code>string</code> |
|
|
| Environment | <code>$CODER_SSH_CONFIG_BINARY_PATH</code> |
|
|
|
|
Optionally specify the absolute path to the coder binary used in ProxyCommand. By default, the binary invoking this command ('config ssh') is used.
|
|
|
|
### -o, --ssh-option
|
|
|
|
| | |
|
|
|-------------|-------------------------------------|
|
|
| Type | <code>string-array</code> |
|
|
| Environment | <code>$CODER_SSH_CONFIG_OPTS</code> |
|
|
|
|
Specifies additional SSH options to embed in each host stanza.
|
|
|
|
### -n, --dry-run
|
|
|
|
| | |
|
|
|-------------|---------------------------------|
|
|
| Type | <code>bool</code> |
|
|
| Environment | <code>$CODER_SSH_DRY_RUN</code> |
|
|
|
|
Perform a trial run with no changes made, showing a diff at the end.
|
|
|
|
### --use-previous-options
|
|
|
|
| | |
|
|
|-------------|----------------------------------------------|
|
|
| Type | <code>bool</code> |
|
|
| Environment | <code>$CODER_SSH_USE_PREVIOUS_OPTIONS</code> |
|
|
|
|
Specifies whether or not to keep options from previous run of config-ssh.
|
|
|
|
### --ssh-host-prefix
|
|
|
|
| | |
|
|
|-------------|-----------------------------------------------|
|
|
| Type | <code>string</code> |
|
|
| Environment | <code>$CODER_CONFIGSSH_SSH_HOST_PREFIX</code> |
|
|
|
|
Override the default host prefix.
|
|
|
|
### --hostname-suffix
|
|
|
|
| | |
|
|
|-------------|-----------------------------------------------|
|
|
| Type | <code>string</code> |
|
|
| Environment | <code>$CODER_CONFIGSSH_HOSTNAME_SUFFIX</code> |
|
|
|
|
Override the default hostname suffix.
|
|
|
|
### --wait
|
|
|
|
| | |
|
|
|-------------|------------------------------------|
|
|
| Type | <code>yes\|no\|auto</code> |
|
|
| Environment | <code>$CODER_CONFIGSSH_WAIT</code> |
|
|
| Default | <code>auto</code> |
|
|
|
|
Specifies whether or not to wait for the startup script to finish executing. Auto means that the agent startup script behavior configured in the workspace template is used.
|
|
|
|
### --disable-autostart
|
|
|
|
| | |
|
|
|-------------|-------------------------------------------------|
|
|
| Type | <code>bool</code> |
|
|
| Environment | <code>$CODER_CONFIGSSH_DISABLE_AUTOSTART</code> |
|
|
| Default | <code>false</code> |
|
|
|
|
Disable starting the workspace automatically when connecting via SSH.
|
|
|
|
### -y, --yes
|
|
|
|
| | |
|
|
|------|-------------------|
|
|
| Type | <code>bool</code> |
|
|
|
|
Bypass prompts.
|