You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ssh.md
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,14 @@
1
1
# SSH Workspaces
2
2
3
-
cmux supports using an SSH remote to run workspaces. When configured, all tool operations will
3
+
cmux supports using remote hosts over SSH for workspaces. When configured, all tool operations will
4
4
execute over SSH and the agent is securely isolated from your local machine.
5
5
6
-
We highly recommend using SSH workspaces for an optimal agentic experience:
6
+
Our security architecture considers the remote machine potentially hostile. No keys or credentials are implicitly transferred there—just the git archive and [Project Secrets](./project-secrets.md).
7
+
8
+
We highly recommend using SSH workspaces for an optimal experience:
7
9
8
10
-**Security**: Prompt injection risk is contained to the credentials / files on the remote machine.
11
+
- SSH remotes pair nicely with [agentic git identities](./agentic-git-identity.md)
9
12
-**Performance**: Run many, many agents in parallel while maintaining good battery life and UI performance
- an alias from your `~/.ssh/config`, e.g. `my-server`
21
+
- anything that passes through `ssh <host>` can be used as a host
18
22
19
-
In fact, we delegate SSH configuration to the system's `ssh` command, so can set up advanced
20
-
configuration for your agentic machine in your local `~/.ssh/config` file.
23
+
We delegate SSH configuration to the system's `ssh` command, so you can set up advanced
24
+
configuration for your agent host in your local `~/.ssh/config` file.
21
25
22
-
Here's an example of an alias:
26
+
Here's an example of a config entry:
23
27
24
28
```
25
29
Host ovh-1
@@ -33,9 +37,9 @@ Host ovh-1
33
37
34
38
There are a few practical ways to set up authentication.
35
39
36
-
### Local defaults
40
+
### Local default keys
37
41
38
-
Ensure your private key is one of these locations:
42
+
`ssh` will check these locations by default:
39
43
40
44
```
41
45
~/.ssh/id_rsa
@@ -47,12 +51,14 @@ Ensure your private key is one of these locations:
47
51
48
52
### SSH Agent
49
53
50
-
If you have an SSH agent running, you can use it to authenticate.
54
+
If you have an SSH agent running, you can add your key:
51
55
52
56
```
53
-
ssh-add ~/.ssh/id_rsa
57
+
ssh-add ~/.ssh/my_key_ecdsa
54
58
```
55
59
60
+
and `ssh` will use it to authenticate.
61
+
56
62
### Config
57
63
58
64
You can also configure authentication in your `~/.ssh/config` file.
@@ -66,12 +72,10 @@ Host my-server
66
72
67
73
## Coder Workspaces
68
74
69
-
If you're using [Coder Workspaces](https://coder.com/docs), you can leverage your existing Workspace
70
-
with cmux:
75
+
If you're using [Coder Workspaces](https://coder.com/docs), you can use an existing Workspace
76
+
as a cmux agent host:
71
77
72
78
1. Run `coder config-ssh`
73
79
2. Use `coder.<workspace-name>` as your SSH host when creating a new cmux workspace
74
80
75
-
Note that in this approach we're multiplexing agents onto a single Coder Workspace, not creating
76
-
a new workspace per agent. This avoids the workspace creation overhead for rapid muxing,
77
-
while still isolating the agent from your local machine.
81
+
Note that in this approach we're multiplexing cmux workspaces onto a single Coder workspace. This avoids the compute provisioning overhead to enable rapid creation and deletion of workspaces.
0 commit comments