Skip to content
← Blog

How do you SSH into an AI agent's cloud computer?

Three ways to get a shell on an Orgo computer: Direct SSH with your key, orgo ssh from the CLI, and the bash API, and when to use each.

Updated

TL;DR: To SSH into an AI agent's cloud computer on Orgo, turn on Direct SSH for a Linux computer, paste your public key, and connect with the command the SSH tab shows, ssh -p <port> root@<host>. If you only want a quick terminal and have no key handy, orgo ssh <name> from the Orgo CLI opens a shell over a WebSocket instead.

Definition: SSH (Secure Shell) is the standard way to open a terminal on a remote machine with a key pair. On an agent's computer, it lets you or a tool like an editor's remote mode work in the same file system and processes the agent uses, without going through the desktop.

The short version:

  • Direct SSH: a real SSH server on the computer. Works with OpenSSH, editors, and any tool that asks for host, port, user, and key. Linux only.
  • orgo ssh: an interactive terminal from the Orgo CLI over a WebSocket. No SSH key needed.
  • POST /computers/{id}/bash: one command, one answer. Best for an agent loop that needs output and an exit code, not a session.

Orgo provides the computer. You bring the agent (Claude computer use, OpenAI's CUA, or your own loop), or start from one of Orgo's curated templates, which come with Hermes Agent, OpenClaw, or Claude Code and Codex set up (llms.txt, Templates). New to agents driving a desktop? Start with What is computer use?

What are the ways to get a shell on an Orgo computer?

Direct SSHorgo ssh <name>Bash API
What it isA standard SSH server over TCPA terminal session over a WebSocketOne synchronous command per request
Needs an SSH keyYes, your public keyNo, uses your orgo loginNo, uses an API key
Works with OpenSSH and editorsYesNoNo
Interactive sessionYesYesNo
Best forEditors, scripts, agent apps that speak SSHA quick hands-on look from your terminalAn agent loop that runs commands and reads output

Sources: Connect with SSH, CLI, Execute bash.

The docs are explicit that the first two are different things. orgo ssh is a terminal over a WebSocket, not an SSH server. Direct SSH is a plain SSH server you connect to over TCP (Connect with SSH).

How do you turn on Direct SSH from the dashboard?

  1. Open the computer's ⋯ menu and choose SSH, or choose Settings there and open the SSH tab.
  2. Paste your public key, the contents of a .pub file such as ~/.ssh/id_ed25519.pub. Never paste the private key.
  3. Click Enable SSH.

The tab then shows the command to connect:

bash
ssh -p <port> root@<host>

Copy it as shown. The host is the server your computer runs on, and the port is your computer's own. Port 22 on that address is not your computer, so always use the port from the tab (Connect with SSH).

If the tab says Key saved. Restart to activate it., restart the computer once from its ⋯ menu, then reopen the SSH tab.

No key yet? Create one first:

bash
ssh-keygen -t ed25519
cat ~/.ssh/id_ed25519.pub

How does an agent turn on SSH by itself through the API?

Everything in the SSH tab works with an API key, so a script or an agent can set up its own access. The key needs the Control permission, read to get the settings and write to turn SSH on or off (Connect with SSH).

Three kinds of key are refused:

  • A one-computer key, or the computer's own ORGO_API_KEY. It gets 403 with computer_scope (your key for one computer) or computer_key (the computer's own key). Use an account key or a workspace key.
  • A key scoped to another workspace. It gets 403 with workspace_scope_mismatch. A workspace key only works on computers in its own workspace.
  • A restricted or expiring key, on a computer that holds its own key. It gets 403 with computer_key_held. Use a full access key that never expires, or sign in.

1. Add your public key. Calling it again replaces all the keys on the computer.

bash
curl -X POST https://www.orgo.ai/api/computers/$COMPUTER_ID/ssh \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"public_key\": \"$(cat ~/.ssh/id_ed25519.pub)\"}"

The answer has enabled, ssh_host_port, pending, and requires_restart. On a running computer the key usually goes in right away. If requires_restart is true, the key couldn't be written live, so restart the computer once and the key is in place (Turn on SSH).

2. Get the command to connect.

bash
curl https://www.orgo.ai/api/computers/$COMPUTER_ID/ssh \
  -H "Authorization: Bearer $ORGO_API_KEY"
json
{
  "enabled": true,
  "authorized_key_set": true,
  "ipv4_host": "203.0.113.10",
  "ipv4_port": 20314,
  "ipv6_address": null,
  "ssh_user": "root",
  "ssh_command": "ssh -p 20314 root@203.0.113.10"
}

Check that enabled is true before you use the rest. After SSH is turned off, the port stays reserved for the computer, so the last port and command can still be returned. ipv6_address is always null for now: there is no IPv6 endpoint yet (Get SSH settings).

3. Turn it off when the job is done.

bash
curl -X DELETE https://www.orgo.ai/api/computers/$COMPUTER_ID/ssh \
  -H "Authorization: Bearer $ORGO_API_KEY"

This removes the saved keys and, on a running computer, deletes /root/.ssh/authorized_keys right away, including keys added there by hand. revoked_in_guest: false means the computer wasn't reachable at that moment (Turn off SSH).

How do you connect an editor or another tool over SSH?

Tools that ask for an SSH endpoint want four values (Connect with SSH):

FieldValue
HostThe host in the SSH tab's command, or ipv4_host
PortThe port in the SSH tab's command, or ipv4_port
Userroot
AuthenticationYour private key

For OpenSSH, a ~/.ssh/config entry saves typing:

Plain text
Host agent-1
  HostName 203.0.113.10
  Port 20314
  User root
  IdentityFile ~/.ssh/id_ed25519

Then ssh agent-1 connects. Re-read the host and port if the computer has moved, as explained below.

In VS Code, install the Remote-SSH extension, add the entry above to ~/.ssh/config, then connect to agent-1 in the Remote Explorer. Any editor with an SSH remote mode takes the same four values.

When should you use orgo ssh instead?

Use orgo ssh when you want a terminal right now and don't want to manage keys. Install the CLI, sign in once, and open a shell by computer name (CLI):

bash
curl -fsSL https://orgo.ai/install.sh | bash
orgo login
orgo ssh agent-1

It lands you in /root/Desktop by default; change that with --cwd. To leave, type ~. at the start of a line, press Ctrl+C twice within 800 ms, or use Ctrl+D or exit. A single Ctrl+C is sent to the remote process (CLI).

When should an agent use the bash API instead of SSH?

An agent that just needs to run a command and read the result doesn't need a session. POST /computers/{id}/bash runs one command and returns combined stdout and stderr plus exit_code (Execute bash).

bash
curl -X POST https://www.orgo.ai/api/computers/$COMPUTER_ID/bash \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command": "ls -la /root/Desktop", "timeout": 60}'

Things to know:

  • success: true only means the command ran. Read exit_code to see whether it worked.
  • Omitting timeout allows 200 seconds. Sending one clamps it to 1 to 300 seconds. On Linux, a command killed by the timeout returns exit_code: -1 with truncated output.
  • On Windows computers, this endpoint runs PowerShell, despite its name. A timeout there returns exit_code: 124 and error: "timeout".

For the rest of the API, see the Orgo computer use API.

Who can turn SSH on, and which computers support it?

  • Linux computers only. Mac, Windows, Android, and iPhone computers don't have Direct SSH. Turning it on for a non-Linux computer returns 400 with SSH_UNSUPPORTED_OS (Connect with SSH).
  • Owners and Full access members. The workspace owner and members with Full access can turn it on, change keys, and turn it off. Can chat members get 403 with workspace_read_only, and share link guests are refused too (Connect with SSH, Workspaces).
  • Accepted keys: ssh-ed25519, ssh-rsa, ecdsa-sha2-*, and the security key types sk-ssh-ed25519@openssh.com and sk-ecdsa-sha2-*@openssh.com. Paste one key per line to allow more than one, up to 16 KB in total.
  • You log in as root, with your key.

To remove one key, send the keys you want to keep, without that one. Saving replaces every key on the computer. To remove all keys and turn SSH off, use DELETE /computers/{id}/ssh.

What happens to SSH when the computer restarts or moves?

  • Restart: a regular computer keeps its host and port. Your sessions drop during the reboot, and the same command works once it's back up (Restart computer).
  • Dedicated GPU computer: the port changes on every restart. The restart answers 202 with an operation, and the finished operation's result has the new ssh host, port, and command. GET /computers/{id}/ssh returns the new address too.
  • Stop and start, or a move to another server: host and port can both change. Read them again from the SSH tab or the API; don't cache them.
  • Suspended: it takes no connections until it wakes. One moved to storage has no address at all: GET /computers/{id}/ssh returns 409 with computer_asleep. You can still save keys or turn SSH off while it sleeps.

Which errors can the SSH API return?

StatusCodeMeaning
400SSH_UNSUPPORTED_OSThe computer isn't Linux
400nonepublic_key is missing, empty, over 16 KB, or not a valid public key
402variesThe computer's access has ended (plan or allocation)
403workspace_read_onlyYou're a Can chat member
403GUEST_RESTRICTEDYou joined through a share link as a guest
403key_permissionThe API key lacks the Control level this call needs
403computer_key_heldA restricted or expiring API key, on a computer that holds its own key
403computer_key or computer_scopeThe API key is limited to one computer
403workspace_scope_mismatchThe API key is scoped to another workspace
409computer_asleepGET on a computer asleep in storage

Sources: Turn on SSH, Get SSH settings.

What breaks, and how do you fix it?

SymptomLikely causeFix
Permission denied (publickey)The key isn't on the computer yet, or you used a different private keyPaste the public key again under Manage access, click Update key, restart once if asked, and connect with ssh -i ~/.ssh/<key> -p <port> root@<host>
Connection refused or a timeoutWrong port, or the computer isn't runningUse the port from the SSH tab, never 22, and start or wake the computer
Connection refused on the right port, on a running computerNothing is listening on port 22 inside it. The computer's image may not run an SSH serverRun pgrep -a sshd through orgo ssh or the bash API. No output means no SSH server is running, so contact support
It worked yesterday, not todayThe computer moved to another server, so host and port changedReopen the SSH tab or call GET /computers/{id}/ssh again; don't cache them
No connection at allThe computer is suspended. If it moved to storage, GET returns 409 computer_asleepWake the computer, then read the host and port again

Sources: Connect with SSH, Get SSH settings.

Still stuck? The docs ask for the output of ssh -v -p <port> root@<host> when you contact support.

For why a computer moves or goes to sleep, see how to pause, fork, or clone an AI agent's computer.

FAQ

Can I SSH into an Orgo computer with my own key? Yes, on Linux computers. Paste your public key in the SSH tab or send it to POST /computers/{id}/ssh, then connect with the command it shows.

Why can't I connect on port 22? Port 22 on the host address belongs to the server your computer runs on, not your computer. Use the port the SSH tab or ipv4_port gives you.

Is orgo ssh the same as SSH? No. orgo ssh is a terminal over a WebSocket from the Orgo CLI and needs no SSH key. Direct SSH is a standard SSH server that OpenSSH and editors can use.

Can an AI agent enable SSH on its own computer? Yes, with an account or workspace API key that has the Control permission. The computer's own ORGO_API_KEY can't: it gets 403 computer_key.

Does SSH work on Mac or Windows computers on Orgo? Not Direct SSH; it is Linux only. On Windows, the bash API runs PowerShell commands instead.

How do I add a teammate's key? Put both public keys in the field, one per line, and save. Saving replaces the keys on the computer, so include yours too.

Does a restart change the SSH port? Not on a regular computer. On a dedicated GPU computer, the port changes on every restart.

Do I need to turn SSH off when I'm done? It is a good habit for short jobs. DELETE /computers/{id}/ssh removes the keys from the computer immediately when it is running.

Sources