Skip to main content
Cursor, VS Code and Antigravity open a remote project by installing their own server on the host over SSH and reaching it through port forwards. Pointed at Mirage, that server runs on a machine the workspace sends its lines to, and works on the workspace’s mounts there.

Set up

1

Turn on SSH

Set up the SSH server: a port, and a public key in ~/.mirage/ssh/authorized_keys.
2

Start a machine

The editor needs 64-bit Linux with glibc, and curl or wget to fetch its server. python3, socat or bash carries its port forwards.
3

Create the workspace

workspace.yaml
@line runs every SSH line whole on the machine. timeout_seconds: 0 lifts the 10 minute line limit, since the editor’s setup line stays open as long as its window does.

Connect

Add the workspace as an SSH host:
~/.ssh/config
On a hosted server, use the Over HTTPS entry instead and connect to demo@mirage. The editor’s terminal, tasks and extensions run on the machine, and the files under /project are the workspace’s.

How it behaves

  • A dropped connection leaves the editor’s server running, as sshd does, so the editor reconnects to the same server.
  • Each port forward runs as a line of its own session, so the login’s profile and policies judge it as any line.
  • The editor’s server runs its own commands on the machine. Mirage’s command rules see the lines that come over SSH, and every file call into a mount still goes through the workspace.
  • A reconnect leaves the old setup line running until the editor’s server exits, and each counts against the server’s max_sessions.