# SSH and IDEs

## Recommended: lt term

The recommended way into your machine is [`lt term`](/connect/): a terminal over Mosh. Typing
stays responsive on slow or mobile networks, and the connection survives your laptop sleeping or
changing networks and reconnects by itself.

```sh
curl -fsSL https://get.liveterminal.ai/install.sh | sh
lt auth login
lt term first-box
```

We recommend setting up Claude Code or Codex **inside** the machine and going into the machine with
`lt term`, rather than running the agent on your laptop over SSH.

## Plain SSH, when a tool needs it

Some tools speak SSH themselves: Claude Code's or Codex's SSH environments, VS Code Remote-SSH,
`scp`. For them you can reach your machine with plain `ssh`, with nothing from LiveTerminal
installed on your computer.

### Set up SSH

Ask your AI:

> Set up SSH to first-box.

It adds your public key to the machine (`~/.ssh/authorized_keys` of its user) with the
connector's `ssh_key_add` tool, which also registers it with the jump host for your Account, and
writes the block from `ssh_config` into `~/.ssh/config` on your computer, like this:

```text
Host first-box
  HostName vps-<id>
  User dev
  ProxyJump lt@ssh.liveterminal.ai
```

Then:

```sh
ssh first-box
```

`scp`, `rsync`, SFTP clients and VS Code Remote-SSH work the same way.

- If your AI runs in a chat app (Claude Desktop, claude.ai, the phone app), it can't read your
  files. It asks you to paste your public key, the one line in `~/.ssh/id_ed25519.pub` (create one
  with `ssh-keygen -t ed25519`), and gives you the block to paste into `~/.ssh/config`. Never paste
  a private key; LiveTerminal refuses it.
- The first connection asks you to trust two host keys: the jump host `ssh.liveterminal.ai` and
  your machine. Answer yes to both.
- The jump host lets in only keys added this way, and forwards them only to your Account's
  machines. Your machine itself then checks your key. A key you put into `authorized_keys` by
  hand also needs adding through your AI before plain `ssh` gets past the jump host.
- Connecting to a sleeping machine wakes it; the first connection waits a few seconds.

To remove access, ask your AI to remove the key (it also ends the key's registration for that
machine), or delete that key's line from `~/.ssh/authorized_keys` on the machine. New logins with
it fail at once.

### Without an AI

Plain HTTP on `https://app.liveterminal.ai`, with an [API token](/mcp/#connect-with-an-api-token)
as `Authorization: Bearer ...`, does the same steps: `POST /v1/vps/{id}/ssh-keys` with
`{"publicKey": "<the one line of your .pub file>"}` adds your key, and
`GET /v1/vps/{id}/ssh-access` returns the block for `~/.ssh/config` (`sshConfig`).
`GET /v1/vps/{id}/ssh-keys` lists the keys and `DELETE /v1/vps/{id}/ssh-keys/{keyId}`
removes one.

### VS Code and Cursor

With the block in `~/.ssh/config`, use **Remote-SSH: Connect to Host…** and pick `first-box`.
VS Code or Cursor installs its server on the machine and opens its folders.

### Claude Desktop

Claude Desktop can run its chats inside your machine over SSH:

1. Click **New** (top left).
2. Under the chat input (bottom left), click the environment name, then **New environment →
   SSH → Add connection**.
3. Enter the Host name from your SSH config, for example `first-box`, as both the name and the
   host. Claude finds the rest in `~/.ssh/config`.

New chats in that environment run inside your machine. Use Claude Desktop downloaded from
claude.ai: the Microsoft Store version can't use the jump host (`ProxyJump`).

### The Codex app

Open **Settings → Connections** (Remote SSH) and pick `first-box`.

## With the CLI

If you use the [`lt` CLI](/install/), `lt ssh-config` writes SSH aliases for all your machines,
and `lt term` opens a terminal without any SSH setup. See [Terminal with lt](/connect/).