ssh

Start a shell into a workspace

Usage

coder ssh [flags] <workspace>

Options

--disable-autostart

Typebool
Environment$CODER_SSH_DISABLE_AUTOSTART
Defaultfalse

Disable starting the workspace automatically when connecting via SSH.

-A, --forward-agent

Typebool
Environment$CODER_SSH_FORWARD_AGENT

Specifies whether to forward the SSH agent specified in $SSH_AUTH_SOCK.

-G, --forward-gpg

Typebool
Environment$CODER_SSH_FORWARD_GPG

Specifies whether to forward the GPG agent. Unsupported on Windows workspaces, but supports all clients. Requires gnupg (gpg, gpgconf) on both the client and workspace. The GPG agent must already be running locally and will not be started for you. If a GPG agent is already running in the workspace, it will be attempted to be killed.

--identity-agent

Typestring
Environment$CODER_SSH_IDENTITY_AGENT

Specifies which identity agent to use (overrides $SSH_AUTH_SOCK), forward agent must also be enabled.

-l, --log-dir

Typestring
Environment$CODER_SSH_LOG_DIR

Specify the directory containing SSH diagnostic log files.

--no-wait

Typebool
Environment$CODER_SSH_NO_WAIT

Enter workspace immediately after the agent has connected. This is the default if the template has configured the agent startup script behavior as non-blocking.

-R, --remote-forward

Typestring
Environment$CODER_SSH_REMOTE_FORWARD

Enable remote port forwarding (remote_port:local_address:local_port).

--stdio

Typebool
Environment$CODER_SSH_STDIO

Specifies whether to emit SSH output over stdin/stdout.

--wait

| | | | ----------- | ---------------------------- | --- | ------------ | | Type | enum[yes | no | auto] | | Environment | $CODER_SSH_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.

--workspace-poll-interval

Typeduration
Environment$CODER_WORKSPACE_POLL_INTERVAL
Default1m

Specifies how often to poll for workspace automated shutdown.

See an opportunity to improve our docs? Make an edit.
On this page