Editors and SSH
Every way into a workspace goes through the installation’s relay. You never need network access
to the runner or to the workspace, only to https://app.<domain>.
spin ssh
Section titled “spin ssh”spin ssh apispin ssh api --start # start it first if it is stoppedspin ssh api -- -L 8080:localhost:80 # anything after -- goes to sshYou are root. The CLI carries the connection over a WebSocket to the relay, and SSH itself
stays end to end between your client and the workspace’s sshd.
Plain ssh, scp and rsync
Section titled “Plain ssh, scp and rsync”spin ssh-configssh spin.apiscp ./notes.txt spin.api:/root/rsync -a ./src/ spin.api:/root/src/spin ssh-config writes ~/.spin/ssh/config and includes it from ~/.ssh/config. From then on,
any program that runs ssh reaches a workspace as the host spin.<workspace>. Each connection
gets a new certificate for your key that is valid for five minutes, so there is no long-lived
credential to leak.
It uses the key you name with -i, or the first of ~/.ssh/id_ed25519, id_rsa and
id_ecdsa. If you have none, the CLI makes a key of its own the first time. The key is never
uploaded: the control plane signs a short certificate for its public half, per connection.
VS Code
Section titled “VS Code”spin code apispin code api /srv/app --startThis opens VS Code with Remote-SSH at the path you name (/root by default). It needs the
code command and the Remote-SSH extension.
An installation can publish the VS Code server for recent stable releases of VS Code, so that it is already in the workspace and nothing is downloaded when you connect. If your VS Code is a version the installation has not published, it downloads its own server into the workspace, about 220 MB, and the workspace needs a network policy that lets it.
Any editor with a remote-over-SSH mode works the same way through spin ssh-config.
The dashboard’s terminal
Section titled “The dashboard’s terminal”A workspace’s page in the dashboard has Open Terminal, a shell in the browser, over the same relay.
Running one command
Section titled “Running one command”spin exec api -- make testspin exec api -w /srv/app -- git statusspin exec api -- cat build.log > local.logspin exec runs a command in the workspace, connects its standard input, output and error to
yours, and exits with its exit status. It allocates a terminal only when both ends are one, so
its output is safe to pipe.
SSH keys
Section titled “SSH keys”spin ssh-key add laptop ~/.ssh/id_ed25519.pubspin ssh-key listNone of the commands above need this. Keys you add are authorized in your workspaces, for a
client that connects without the CLI’s certificate. Each workspace also has a key pair of its own;
spin ssh-key get api downloads its private key, for tools that cannot use the CLI.
Documents Spinbox v20261019.02. This page as Markdown, for a model or a terminal.

