> ## Documentation Index
> Fetch the complete documentation index at: https://docs.boxd.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# SSH

> SSH directly into your machines.

You can SSH straight into any machine you own — plain `ssh`, `scp`, `rsync`, port-forwarding, and editor Remote-SSH all work.

<Note color="#E05A6D">
  The old `ssh boxd.sh` **management** shell (the `boxd>` REPL for creating and listing machines over SSH) has been **retired**. Manage machines with the [boxd CLI](/reference/external-cli) instead — install it with `curl -fsSL https://boxd.sh/downloads/install.sh | sh`, then `boxd auth login`. Connecting *into* a machine over SSH still works, and is what this page covers.
</Note>

## The `<vm>.boxd` host alias

Each machine listens on a dedicated SSH **port** (in the 10000–30000 range) on the shared proxy IP. The `boxd` CLI writes a per-machine `Host` alias — `<vm>.boxd`, with the right `HostName` and `Port` — into your `~/.ssh/config`, and keeps it in sync automatically on every `boxd machine new` / `fork` / `list` / `remove` / `rename`. There's no separate command to run; install the CLI and the aliases appear.

```bash theme={"theme":"github-dark"}
curl -fsSL https://boxd.sh/downloads/install.sh | sh   # install the CLI (writes ~/.ssh/config aliases)
boxd auth login                                        # sign in
boxd machine list                                      # refreshes the managed block
```

The managed block is bracketed with `# BEGIN boxd` / `# END boxd`; nothing outside the markers is touched.

## Direct SSH, SCP, port-forwarding, editors

Once the alias exists, everything standard works against `<vm>.boxd`:

```bash theme={"theme":"github-dark"}
ssh myapp.boxd                          # shell
scp ./file myapp.boxd:/home/boxd/       # copy
rsync -a ./dir/ myapp.boxd:/home/boxd/dir/   # sync
ssh -L 5432:localhost:5432 myapp.boxd   # port-forward
# VS Code / Cursor / Zed / JetBrains: pick `myapp.boxd` from the Remote-SSH picker
```

You land as the `boxd` user with passwordless sudo. Working directory is `/home/boxd`.

<Note color="#E05A6D">
  Connecting to the bare `myapp.boxd.sh` hostname (port 22) reaches the **proxy**, not the machine — the management shell that used to live there is retired. Use the `myapp.boxd` alias (or `boxd connect myapp`) to get into the machine.
</Note>

<Warning>
  Direct SSH only works for the machine owner. Your SSH key must match the key registered to your account.
</Warning>

## No CLI? Use `boxd connect`

If you can't install the CLI on a given host but have it elsewhere, `boxd connect <name>` opens an interactive shell into the machine over the boxd API (no SSH config or host keys needed):

```bash theme={"theme":"github-dark"}
boxd connect myapp        # interactive shell (also: boxd machine connect myapp)
```

## Adding more SSH keys

Sign in from a different machine with a new key and go through the browser link flow (`boxd auth login`). The new key gets linked to your existing account (matched by your identity).
