coder config-ssh
Add an SSH Host entry for your workspaces "ssh workspace.coder".
On this page
Add an SSH Host entry for your workspaces "ssh workspace.coder"
Usage
Usagecoder config-ssh [flags]Description
Description - 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-runOptions
Options--ssh-config-file
--ssh-config-file| Property | Value |
|---|---|
| Type | string |
| Environment | $CODER_SSH_CONFIG_FILE |
| Default | ~/.ssh/config |
Specifies the path to an SSH config.
--coder-binary-path
--coder-binary-path| Property | Value |
|---|---|
| Type | string |
| Environment | $CODER_SSH_CONFIG_BINARY_PATH |
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
-o, --ssh-option| Property | Value |
|---|---|
| Type | string-array |
| Environment | $CODER_SSH_CONFIG_OPTS |
Specifies additional SSH options to embed in each host stanza.
-n, --dry-run
-n, --dry-run| Property | Value |
|---|---|
| Type | bool |
| Environment | $CODER_SSH_DRY_RUN |
Perform a trial run with no changes made, showing a diff at the end.
--use-previous-options
--use-previous-options| Property | Value |
|---|---|
| Type | bool |
| Environment | $CODER_SSH_USE_PREVIOUS_OPTIONS |
Specifies whether or not to keep options from previous run of config-ssh.
--ssh-host-prefix
--ssh-host-prefix| Property | Value |
|---|---|
| Type | string |
| Environment | $CODER_CONFIGSSH_SSH_HOST_PREFIX |
Override the default host prefix.
--hostname-suffix
--hostname-suffix| Property | Value |
|---|---|
| Type | string |
| Environment | $CODER_CONFIGSSH_HOSTNAME_SUFFIX |
Override the default hostname suffix.
--wait
--wait| Property | Value |
|---|---|
| Type | yes|no|auto |
| Environment | $CODER_CONFIGSSH_WAIT |
| Default | auto |
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
--disable-autostart| Property | Value |
|---|---|
| Type | bool |
| Environment | $CODER_CONFIGSSH_DISABLE_AUTOSTART |
| Default | false |
Disable starting the workspace automatically when connecting via SSH.
--no-wildcard
--no-wildcard| Property | Value |
|---|---|
| Type | bool |
| Environment | $CODER_CONFIGSSH_NO_WILDCARD |
| Default | false |
Generate an individual host entry for each workspace and its known agents instead of a wildcard host block. This allows third-party tools and SSH clients to discover workspaces by reading the config file.
--force-unix-filepaths
--force-unix-filepaths| Property | Value |
|---|---|
| Type | bool |
| Environment | $CODER_CONFIGSSH_UNIX_FILEPATHS |
By default, 'config-ssh' uses the os path separator when writing the ssh config. This might be an issue in Windows machine that use a unix-like shell. This flag forces the use of unix file paths (the forward slash '/').
-y, --yes
-y, --yes| Property | Value |
|---|---|
| Type | bool |
Bypass confirmation prompts.