Files
coder/docs/reference/cli/config-ssh.md
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

141 lines
4.8 KiB
Markdown
Raw Normal View History

---
# Code generated by make gen. DO NOT EDIT.
title: config-ssh
description: "Add an SSH Host entry for your workspaces \"ssh workspace.coder\""
---
2023-03-23 17:42:20 -05:00
<!-- DO NOT EDIT | GENERATED CONTENT -->
Add an SSH Host entry for your workspaces "ssh workspace.coder"
2023-03-23 17:42:20 -05:00
## 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:
2023-03-23 17:42:20 -05:00
$ coder config-ssh -o ForwardAgent=yes
2023-03-23 17:42:20 -05:00
- You can use --dry-run (or -n) to see the changes that would be made:
$ coder config-ssh --dry-run
2023-03-23 17:42:20 -05:00
```
## Options
### --ssh-config-file
| | |
|-------------|-------------------------------------|
2023-03-23 17:42:20 -05:00
| 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
2023-03-23 17:42:20 -05:00
| | |
|-------------|--------------------------------------------|
| Type | <code>string</code> |
| Environment | <code>$CODER_SSH_CONFIG_BINARY_PATH</code> |
2023-03-23 17:42:20 -05:00
Optionally specify the absolute path to the coder binary used in ProxyCommand. By default, the binary invoking this command ('config ssh') is used.
2023-03-23 17:42:20 -05:00
### -o, --ssh-option
| | |
|-------------|-------------------------------------|
2023-03-23 17:42:20 -05:00
| 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.
2023-03-23 17:42:20 -05:00
### --use-previous-options
| | |
|-------------|----------------------------------------------|
2023-03-23 17:42:20 -05:00
| 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
| | |
|-------------|------------------------------------|
2024-08-20 14:47:46 +10:00
| 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.
### --no-wildcard
| | |
|-------------|-------------------------------------------|
| Type | <code>bool</code> |
| Environment | <code>$CODER_CONFIGSSH_NO_WILDCARD</code> |
| Default | <code>false</code> |
Generate an individual host entry for each workspace 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
| | |
|-------------|----------------------------------------------|
| Type | <code>bool</code> |
| Environment | <code>$CODER_CONFIGSSH_UNIX_FILEPATHS</code> |
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 '/').
2023-03-23 17:42:20 -05:00
### -y, --yes
| | |
|------|-------------------|
2023-03-23 17:42:20 -05:00
| Type | <code>bool</code> |
Bypass confirmation prompts.