feat: add one shot commands to the coder ssh command (#17779)

Closes #2154

> [!WARNING]  
> The tests in this PR were co-authored by AI
This commit is contained in:
brettkolodny
2025-05-16 10:09:46 -04:00
committed by GitHub
parent cb0f778baf
commit 2cd3f999a6
7 changed files with 195 additions and 41 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ Coder — A tool for provisioning self-hosted development environments with Terr
| [<code>schedule</code>](./schedule.md) | Schedule automated start and stop times for workspaces |
| [<code>show</code>](./show.md) | Display details of a workspace's resources and agents |
| [<code>speedtest</code>](./speedtest.md) | Run upload and download tests from your machine to a workspace |
| [<code>ssh</code>](./ssh.md) | Start a shell into a workspace |
| [<code>ssh</code>](./ssh.md) | Start a shell into a workspace or run a command |
| [<code>start</code>](./start.md) | Start a workspace |
| [<code>stat</code>](./stat.md) | Show resource usage for the current workspace. |
| [<code>stop</code>](./stop.md) | Stop a workspace |
+6 -2
View File
@@ -1,18 +1,22 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# ssh
Start a shell into a workspace
Start a shell into a workspace or run a command
## Usage
```console
coder ssh [flags] <workspace>
coder ssh [flags] <workspace> [command]
```
## Description
```console
This command does not have full parity with the standard SSH command. For users who need the full functionality of SSH, create an ssh configuration with `coder config-ssh`.
- Use `--` to separate and pass flags directly to the command executed via SSH.:
$ coder ssh <workspace> -- ls -la
```
## Options