Thanks to visit codestin.com
Credit goes to mux.coder.com

Skip to main content
mux can run workspaces on a remote host over SSH. When configured, tool operations (file reads/edits, bash, etc.) execute on the remote machine.

Threat model

mux treats the remote host as potentially hostile. By default it does not forward your local keys or credentials. The only data synced to the remote machine is:

Why use SSH runtime

  • Security: Prompt injection risk is contained to the credentials/files on the remote machine.
  • Performance: Run many agents in parallel without burning laptop CPU/battery.
ssh workspaces

Host value

The host field accepts anything you can pass to ssh <host>:
  • a hostname (for example my-server.com)
  • a username and hostname (for example [email protected])
  • an alias from your ~/.ssh/config (for example my-server)
mux delegates SSH configuration to your system ssh command, so advanced settings live in ~/.ssh/config. Example entry:
Host ovh-1
  HostName 148.113.1.1
  User root

Authentication

mux delegates to ssh. This is an abbreviated reference of common ways ssh authenticates.

Local default keys

ssh checks these locations by default:
~/.ssh/id_rsa
~/.ssh/id_ecdsa
~/.ssh/id_ecdsa_sk
~/.ssh/id_ed25519
~/.ssh/id_ed25519_sk

SSH agent

If you have an SSH agent running, add your key:
ssh-add ~/.ssh/my_key_ecdsa

~/.ssh/config

You can also set an explicit identity file:
Host my-server
  HostName 148.113.1.1
  User root
  IdentityFile ~/.ssh/id_rsa

Coder Workspaces

If you’re using Coder Workspaces, you can use an existing workspace as a mux agent host:
  1. Run coder config-ssh
  2. Use coder.<workspace-name> as your SSH host when creating a new mux workspace
This multiplexes many mux workspaces onto a single Coder workspace, which avoids per-workspace provisioning overhead.