# Use Cursor or VS Code on a cloud dev box with Remote-SSH

> Open a cloud Linux box in Cursor or VS Code over Remote-SSH, with no keys or hosts to set up, and keep Claude Code or Codex running after the editor closes.

URL: https://prized.dev/docs/cursor-remote-ssh

Prized adds your box to your SSH config, so Cursor and VS Code open it like any SSH host: the window stays on your laptop, and files, terminals and extensions run on the box.

## 1. Create a box [#1-create-a-box]

```bash
cd ~/code/myproject
npx prized
```

It signs you up, starts a box on $30 of free credit with no card, and syncs this folder with `~/code/myproject` on the box. Pick **Cursor** and, on macOS, it opens that folder on the box for you. Already signed in? Run `prized setup` in the folder instead.

Setup writes a `Host` entry for the box to `~/.ssh/config.d/prized` and an `Include` line at the top of `~/.ssh/config`. There are no keys to copy, and the box has no inbound SSH port ([Security](https://prized.dev/docs/security)).

## 2. Check that ssh reaches it [#2-check-that-ssh-reaches-it]

```bash
ssh mango echo connected
```

Use your box's name for `mango` (`prized box ls` lists them). If it prints `connected`, the editor will connect too: Remote-SSH runs the same `ssh`.

## 3. Connect the editor [#3-connect-the-editor]

* **Cursor:** open the Command Palette (Cmd-Shift-P, or Ctrl-Shift-P), run **Remote-SSH: Connect to Host**, and pick `mango`. If the command is missing, install the **Remote - SSH** extension from Cursor's Extensions view.
* **VS Code:** install Microsoft's **Remote - SSH** extension, then run the same command.
* **Asked for the platform:** pick **Linux**.

Then **File > Open Folder** and open `~/code/myproject`. The editor's terminal, search and extensions now run on the box.

## 4. Keep agents running after the editor closes [#4-keep-agents-running-after-the-editor-closes]

The editor's terminal ends with its window, or when the laptop sleeps. For an agent that keeps working, start tmux in that terminal:

```bash title="you@mango ~/code/myproject"
tmux new -A -s claude
```

Run `claude` (or `codex`) inside it, then close the editor or the laptop. The same command reattaches, as does `prized ssh mango -s claude` from any terminal ([Sessions](https://prized.dev/docs/sessions)).

## If the box is asleep [#if-the-box-is-asleep]

Remote-SSH, plain `ssh` and sync do not wake a paused box: the editor fails to connect, and its log says the box is not running. Wake it, then run **Developer: Reload Window**:

```bash
prized box resume mango --wait
```

`prized ssh mango` wakes it too. On the free credit, a box pauses after 2 hours idle, but never in its first 24 hours; on a plan, only if you set auto-pause ([Auto-pause](https://prized.dev/docs/boxes#auto-pause)).

## Sync or Remote-SSH [#sync-or-remote-ssh]

Remote-SSH runs the editor's tools on the box, which must be awake. [Sync](https://prized.dev/docs/sync) keeps the folder on your laptop for any local editor, offline too. Both work on the same project at once; when both sides change a file, the box's copy wins by default ([Conflicts](https://prized.dev/docs/sync#conflicts-the-box-wins)).

## Troubleshooting [#troubleshooting]

| Symptom                                                 | What to do                                                                                                                |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `Could not resolve hostname mango`                      | The `Include` line is missing from `~/.ssh/config`: `prized doctor` adds it ([Troubleshooting](https://prized.dev/docs/troubleshooting)).   |
| `mango is paused because your free credit ran out`      | Nothing was deleted. Pick a plan at the link it prints to start the box again ([Running out](https://prized.dev/docs/billing#running-out)). |
| `"mango" is not the box this machine knew by that name` | The box was recreated, or another box took its name: `prized box rebind mango`.                                           |

## Related [#related]

* [Run Claude Code and Codex on a remote dev box](https://prized.dev/docs/remote-dev-box)
* [Keep Claude Code running with your laptop closed](https://prized.dev/docs/keep-claude-code-running)
* [Run multiple agents in parallel](https://prized.dev/docs/parallel-agents)
