---
title: "It speaks SSH · Tempo AI Platform docs"
description: "How an SSH connection reaches a cloud agent through a relay and its own Durable Object, signs in with Tempo ID, carries files and survives deploys."
url: "https://gateway.tempo-dev.workers.dev/docs/guides/ssh"
---

> Every page of the Tempo AI Platform is Markdown at its URL with .md, or with Accept: text/markdown. The index of every page is https://gateway.tempo-dev.workers.dev/llms.txt, the API https://gateway.tempo-dev.workers.dev/openapi.json and the MCP server https://gateway.tempo-dev.workers.dev/mcp.

# It speaks SSH

`ssh tempo.nanocode.xyz` opens a cloud agent in nanocode's terminal UI. The SSH server is TypeScript running in a Durable Object behind a small relay, your SSH key signs you in once Tempo ID approves it, and every turn runs on the same agent the API and the web reach.

[Get your Tempo Key](https://gateway.tempo-dev.workers.dev/key.md) · [Agents reference](https://gateway.tempo-dev.workers.dev/docs/agents.md)

## Architecture

```text
ssh research@tempo.nanocode.xyz       ssh tempo, after the installer
  | TCP, port 22                        | a WebSocket from your machine,
  v                                     | for networks that block 22
Cloudflare Spectrum                     |
  -> the relay: a WebSocket each        |
  |                                     |
  v                                     v
wss://<gateway>/ssh -> SshSession, one Durable Object per connection
  SSH-2.0 in TypeScript: ML-KEM-768 + X25519, AES-GCM, your key
  |
  +-- a key it knows -> that key's Tempo Key
  +-- a new key      -> a Tempo ID approval, once
  |
  v
the console, one-shots, scp and sftp
  -> /v1/agents/research in process, paid over the key's MACH session
```

Two ways in, one server: plain ssh through Spectrum and the relay, or the installer's WebSocket from your machine, both reach the connection's own Durable Object, which signs you in and drives the agent.

## How a connection gets in

1. A Worker cannot take TCP from the internet, so port 22 of `tempo.nanocode.xyz` is a Cloudflare Spectrum app that forwards to a relay. The relay hands each TCP connection a WebSocket to `/ssh` and copies the bytes both ways, so sign-in, Tempo ID and the agent all stay in the Worker.
2. Each connection gets its own `SshSession` Durable Object, which speaks SSH-2.0 itself on WebCrypto: the post-quantum `mlkem768x25519-sha256` key exchange, or `curve25519-sha256`, AES-GCM both ways and an Ed25519 host key derived from the platform's secret.
3. Your client signs in with its key. The server starts reading your session as soon as the key is offered, one round trip before the signature, and uses what it read only once the signature verifies.
4. The console then drives the agent through the gateway's own `/v1/agents` routes, in process, so a turn over SSH is the same turn as one sent with curl.

When a network blocks outbound port 22, `curl -fsSL https://gateway.tempo-dev.workers.dev/ssh | sh` writes a small Node `ProxyCommand` that opens the WebSocket from your machine, pins the host key and adds a `Host tempo` block to `~/.ssh/config`. Then `ssh tempo`.

## Signing in

- **Your key is the login**\
  Ed25519, ECDSA on P-256, P-384 or P-521, RSA, FIDO security keys, or an OpenSSH certificate of any of them, which signs in as its own key. The fingerprint is what the platform remembers.
- **One approval**\
  A key it has not seen gets a Tempo ID approval in the terminal, a code and a link. Approving it issues a Tempo Key of 20 MACH for 30 days, with a deposit and top-up of 1, sealed and stored under the fingerprint, so the next `ssh` goes straight in. A key that is revoked or expired is asked again.
- **No key at all**\
  A client with no usable key signs in through `keyboard-interactive`: Tempo ID approves that connection only, and nothing is stored.
- **One session channel**\
  An SSH key pays only over its MACH session with the gateway. Web search, sandboxes and other paid services are bought by the gateway and charged in that session, so the wallet sees one channel instead of a transfer for every call.

## The username names the agent

`ssh research@tempo.nanocode.xyz` opens your agent `research`, creating it with Codex the first time, and plain `ssh tempo.nanocode.xyz` opens the one named after your local login, which is what OpenSSH sends. Any username works: one that is not a valid name is cleaned into one, so `Liam.Horne+x` opens `liam.horne-x`. Every key of your wallet reaches the same agents, so an agent you started with curl or on the web opens over SSH too.

## The console

A shell gets nanocode's terminal UI, full screen: the answer streams as markdown, every tool call is a cell with its input and output, running subagents sit above the composer, and the footer shows the harness, model, effort, agent and wallet. It follows the agent's event stream rather than one turn, so reconnecting replays what happened since this key last looked, and a turn started elsewhere shows up as it runs.

- **Steer and stop**\
  A prompt sent during a turn steers it where the agent takes it. Esc Esc interrupts the turn.
- **Slash commands**\
  `/model` and `/thinking` pick the model and effort, `/new` and `/resume` switch threads, `/agent` focuses a subagent and `/btw` asks it a side question, `/context` shows the window and cost, `/runner connect` prints a hand command, and `/help` lists the rest.
- **Scrolling**\
  The mouse wheel, PgUp and PgDn scroll the transcript, dragging copies with OSC 52 (in tmux, run tmux set -s set-clipboard on so copies reach your clipboard), and leaving prints the last 1,000 lines into your scrollback.

## One-shots, pipes and files

### One-shots

`ssh research@tempo.nanocode.xyz "prompt"` runs one turn and exits 0 when it completed. Without a terminal, stdout gets only the answer, as markdown, and the prompt, tool cells and summary go to stderr, so `ssh writer@tempo.nanocode.xyz "…" < notes.md > draft.md` keeps just the reply.

### Pipes

Whatever is piped in goes to the agent: it is saved as `uploads/stdin.txt` in the workspace, and added to the prompt itself when it is text of at most 64 KiB.

### scp and sftp

`scp` works both ways, over SFTP or the legacy protocol. An upload lands in the agent's `/workspace/uploads/` under its file name, replacing one of the same name, at most 5 MiB a file and 64 a session; a download fetches any file under `/workspace` up to 8 MiB, and `scp -r` and `sftp`'s `ls` walk directories. `rsync` and port forwarding are refused with a message that says so.

## What survives

A deploy resets every Durable Object, and a session's keys live in its object. So every 2 seconds, and before each prompt or command, the session saves a checkpoint of its keys, packet counts and console, and the relay keeps your TCP connection open when the object goes away. It redials, and a new object resumes the same SSH connection from the checkpoint while the relay replays the packets after it; the console redraws and says reconnected. Turns keep running in the agent's own object meanwhile. Under `vp dev` on 2026-11-04 a reset resumed in 260 to 270 ms with the client connected throughout and a half-typed prompt kept, and on the deployed gateway the same day a cut connection resumed 1.2 s later. A session is not resumable during its handshake or a rekey, over the installer's `ProxyCommand`, or after a keyless sign-in.

## How fast it is

On the deployed gateway on 2026-11-04, from a Mac 63 ms from the relay, a connection reached the prompt in 0.79 to 1.1 s and a keystroke echoed in 77 to 100 ms at the median. The relay is one machine in the US, so from Europe each keystroke crosses the Atlantic twice; the installer's WebSocket reaches the nearest Cloudflare location instead, and the console suggests it when the round trip is over 150 ms.

## Try it

**Open an agent**

```sh
ssh research@tempo.nanocode.xyz
```

**Pipe a prompt**

```sh
git diff | ssh reviewer@tempo.nanocode.xyz "review this"
```

**Copy files**

```sh
scp data.csv analyst@tempo.nanocode.xyz:
ssh analyst@tempo.nanocode.xyz "analyze uploads/data.csv and write report.md"
scp analyst@tempo.nanocode.xyz:report.md .
```

**Port 22 blocked**

```sh
curl -fsSL https://gateway.tempo-dev.workers.dev/ssh | sh
ssh tempo
```

## Go deeper

- [Agents](https://gateway.tempo-dev.workers.dev/docs/agents.md): the routes the console drives.
- [How a turn runs](https://gateway.tempo-dev.workers.dev/docs/guides/swarms.md): what keeps running when you disconnect.
- [Machines](https://gateway.tempo-dev.workers.dev/docs/machines.md): attaching your machine as a hand from `/runner connect`.

[<- It's an MPP service](https://gateway.tempo-dev.workers.dev/docs/guides/mpp.md) · [Agents ->](https://gateway.tempo-dev.workers.dev/docs/agents.md)
