Revert "feat: add reverse ssh sandbox targets"

This reverts commit d85f68a176.
This commit is contained in:
vhaudiquet committed 2026-11-29 21:34:09 +01:00
1 parent d85f68a176
commit 4d9530cc34
20 files changed
+38 -893

No files matched your search

+2 -37
View File
@@ -112,8 +112,7 @@ issue certificates.
Append that line to `~/.ssh/authorized_keys` on the target. Set the
workspace root to a directory the ssh user can write (for a normal
user, `/home/<name>`; the default is `/root`). Test the target; a
green check means ssh works. For a machine behind NAT, choose
**Reverse SSH** instead; see below.
green check means ssh works.
3. **New room.** Pick the target and provider, give the workspace
directory (for example `/home/me/rooms/demo`), and optionally a git
URL. The workspace is created on the first mention and seeded from
@@ -130,34 +129,6 @@ The agent always runs with the room's sandbox, and every command is an
ordinary ssh command. There is no approval prompt: the sandbox is the
boundary.
## Reverse SSH
A machine behind NAT can dial the server instead of accepting a
connection. This is the fallback for an account that will not install a
connector; the server still speaks ssh to the sandbox.
Reverse SSH needs a tunnel-only sshd in the app's network namespace.
`deploy/tunnel` has a config and the setup steps. The app writes the
sshd's `authorized_keys` file: one key per target, restricted to the
target's loopback port with `permitlisten`, no shell, no local
forwarding, and no non-loopback bind.
In **Settings → Sandboxes**, choose **Reverse SSH**. The server assigns
the loopback port. Save the tunnel private key shown once as
`rhema-tunnel-<target-id>` and run `chmod 600` on it. Add the target's
public key to the sandbox's `~/.ssh/authorized_keys`, then run the
command from the target's **Setup** dialog:
```sh
autossh -M 0 -N -R 127.0.0.1:22000:localhost:22 -p 2222 \
tunnel@together.example.com -i ./rhema-tunnel-<target-id> \
-o ExitOnForwardFailure=yes -o ServerAliveInterval=30
```
The sandbox needs an sshd on `localhost:22`. The tunnel key is a
credential; rotating it invalidates the old key. The tunnel sshd is
internet-facing, so patch it and rate-limit it.
## Preview
The preview shows one target per room. It is either a port inside the
@@ -230,13 +201,7 @@ Every field can be set in the YAML file (`TOGETHER_CONFIG`, default
| `TOGETHER_WEB_DIR` | `web/.output/public` | built client |
| `TOGETHER_MAX_TURN_STEPS` | `48` | step cap per turn |
| `TOGETHER_ALLOW_REGISTRATION` | `false` | whether `/register` works |
| `TOGETHER_ALLOW_PRIVATE_TARGETS` | `false` | whether a direct sandbox target may use a loopback or private address |
| `TOGETHER_TUNNEL_AUTHORIZED_KEYS` | `data/tunnel/authorized_keys` | file the tunnel sshd reads; the app writes it |
| `TOGETHER_TUNNEL_SSH_HOST` | host from `TOGETHER_PUBLIC_URL` | host shown in the reverse ssh command |
| `TOGETHER_TUNNEL_SSH_PORT` | `2222` | tunnel sshd port |
| `TOGETHER_TUNNEL_USER` | `tunnel` | account the tunnel sshd accepts |
| `TOGETHER_TUNNEL_PORT_START` | `22000` | first loopback port assigned to a reverse target |
| `TOGETHER_TUNNEL_PORT_END` | `22999` | last loopback port assigned to a reverse target |
| `TOGETHER_ALLOW_PRIVATE_TARGETS` | `false` | whether a sandbox target may use a loopback or private address |
## Security model