CubeDocs

SSH from Codex and Claude

Reach your machine from the Codex and Claude apps, or any SSH client.

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

Turn it on

Open Machine and find the SSH group. Allow SSH from this Mac is on by default. The first time, Cube:

  1. Creates a key for this Mac at ~/.ssh/cube_ed25519.
  2. Writes a host entry to ~/.ssh/cube.config and adds Include cube.config to ~/.ssh/config.
  3. Registers the key with your machine.

Cloud

ReposAgentsMachine

SSH

Allow SSH from this Mac
Command
ssh cube-swift-otter
Host
cube-swift-otter
Hostname
swift-otter.vm.cube.fast
Port
22022
User
node
Key
~/.ssh/cube_ed25519
Key (PEM)
~/.ssh/cube_ed25519.pem

Cube wrote these files on this Mac to set up SSH:

  • ~/.ssh/cube_ed25519
  • ~/.ssh/cube_ed25519.pub
  • ~/.ssh/cube_ed25519.pem
  • ~/.ssh/cube.config

Check it from Terminal with the command shown under Command:

ssh cube-quiet-copper-fox

Your machine's alias is cube- followed by its name. Copy yours from Command or Host.

FieldValue
HostYour alias, such as cube-quiet-copper-fox.
Hostname<name>.vm.cube.fast
Port22022
Usernode
Key~/.ssh/cube_ed25519
Key (PEM)The same key in PEM format, for apps that ask for one.

SSH accepts keys only, never passwords. SFTP and port forwarding work.

SSH shows up once your machine is set up and paid for. If Cube says Needs an update, choose Update machine, then Update and restart.

Claude

In the Claude desktop app:

  1. Open the Code tab.
  2. Open the environment menu and choose + Add SSH connection.
  3. Enter a Name such as Cube, and your alias as the SSH Host. Leave SSH Port and Identity File empty: they come from your SSH config.
  4. Pick the connection from the environment menu and start a session.

Claude works in the folder you choose on your machine. Your repositories are in ~/repos, for example ~/repos/my-project.

Codex

The Codex app runs the codex on your machine. It comes preinstalled; sign it in first from Settings → Agents: choose Cloud machine, then Sign in beside Codex. Then, in the Codex app:

  1. Open Settings → Connections. Your Cube alias is listed there, read from your SSH config.
  2. Enable it, then choose a project folder on your machine, such as ~/repos/my-project.

Threads in that project run on your machine: commands, file reads and edits all happen there.

Other devices and apps

Cube sets up SSH for the Mac it's running on. For another computer, add that computer's public key to ~/.ssh/authorized_keys on your machine from a Cube terminal, then connect with the hostname, port and user above. Apps that can't read OpenSSH keys, such as some phone apps, take the Key (PEM) file instead.

Turning it off

Switch off Allow SSH from this Mac and Cube deletes the files it wrote on this Mac and removes its key from your machine. It stays off until you turn it back on.

On this page