# SSH from Codex and Claude (/docs/ssh/)



Every Cube computer accepts SSH. The Mac app sets it up for you, so other apps on your Mac, such as
the Codex and Claude desktop apps, can work on your computer too.

## Turn it on [#turn-it-on]

Open your computer, choose **Machine**, and find the **SSH** card. While the computer is running,
turn on **Allow SSH from this Mac**. Cube:

1. Creates a key for this Mac and this computer in `~/.ssh`.
2. Writes a host entry for the computer to its own file in `~/.ssh`, and adds an `Include` line for
   it to `~/.ssh/config`.
3. Registers the key with your computer.

_Illustration: The SSH card with SSH turned on._

Check it from Terminal with the command shown under **Command**:

```sh
ssh cube-…
```

| Field     | Value                                                          |
| --------- | -------------------------------------------------------------- |
| Command   | `ssh` and the computer's host alias.                           |
| Host      | The alias: `cube-` followed by your account and computer IDs.  |
| User      | `ubuntu`                                                       |
| Key       | The key Cube made for this computer, `~/.ssh/<alias>_ed25519`. |
| Key (PEM) | The same key in PEM format, for apps that ask for one.         |

Each computer has its own alias, key and port, so you can reach several computers from one Mac. The
hostname and port are in the host entry Cube wrote; **Files Cube wrote on this Mac**, under the
fields, lists its files.

<Callout type="info">
  Set SSH up from the Mac app. In a browser, Cube can't write to `~/.ssh`, so the **SSH** card asks
  you to use the desktop app.
</Callout>

## Claude [#claude]

Under **Use this Cube in Claude**, choose **Open in Claude**. Cube adds this computer to the Claude
app's SSH environments and opens Claude. Pick the computer in the environment menu, then choose a
folder on it, such as one of your repositories. Claude works entirely on your computer.

The button needs the Claude app installed on your Mac and the computer running.

## Codex [#codex]

Install Codex on your computer first, from **Agents & Tools**, and sign it in: in **Machine**,
**Agent sign-ins** can copy your Mac's Codex sign-in with **Copy from this Mac**.

Then, under **Use this Cube in Codex**, choose **Open in Codex**. Cube opens Codex's SSH connection
setup for this computer. Enable the connection, then choose a project folder on your computer.
Threads in that project run on your computer: commands, file reads and edits all happen there.

## Any other SSH client [#any-other-ssh-client]

Editors and terminals on your Mac read the same SSH config, so they can use the alias directly:
`ssh <alias>`, or the alias as the host in your editor's remote SSH settings.

## Turning it off [#turning-it-off]

Switch off **Allow SSH from this Mac**, or choose **Remove SSH access**. Cube removes its key from
your computer and deletes the files it wrote on this Mac.
