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

# Turn on SSH

> Save your public key and turn on Direct SSH for a Linux computer.

Saves your public key and turns on [Direct SSH](https://docs.orgo.ai/guides/ssh.md). Call it again with new keys to update them: the keys you send replace the keys on the computer. If the answer asks for a restart, the old keys keep working until the computer restarts.

Send the **public** key only (the contents of a `.pub` file). To allow more than one key, put one per line.

When the answer says `requires_restart: true`, the key could not be put on the running computer yet. Restart the computer once and it is in place.

Then read [Get SSH settings](https://docs.orgo.ai/api-reference/computers/ssh-get.md) for the command to connect.

Linux computers only. Owners and editors of the workspace only; Can chat members and share link guests are refused.


## OpenAPI

````yaml POST /computers/{id}/ssh
openapi: 3.1.0
info:
  title: Orgo API
  description: >-
    Launch cloud computers that AI agents can control and interact with. Create
    workspaces, provision computers, and control them programmatically.
  version: 2.0.0
  contact:
    name: Orgo Support
    email: contact@orgo.ai
    url: https://orgo.ai
servers:
  - url: https://www.orgo.ai/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Support
    description: >-
      Orgo’s support agent, for programs: ask how to do something in Orgo and
      get an answer with full URLs and copyable commands.
  - name: Account
    description: >-
      Account capacity: how many computers an account may run, and adding or
      giving back more. Residential data: what the account has left for
      residential IPs, and buying more from credits.
  - name: Agent accounts
    description: >-
      Accounts an AI agent makes for itself, and the claim link a person uses to
      take one over.
  - name: Clients
    description: >-
      Run Orgo for your clients from your own app: a workspace and scoped key
      each, billed to you or to them.
  - name: Workspaces
    description: Organize computers into named workspaces
  - name: Computers
    description: Provision and manage virtual computers
  - name: Public URLs
    description: Share an app running on a computer at an https address on orgo.dev.
  - name: Computer Lifecycle
    description: Start, stop, and restart computers
  - name: Computer Actions
    description: Control mouse, keyboard, and execute commands
  - name: Screens
    description: >-
      More than one desktop on a single computer. Each screen is its own X
      server with its own cursor and window manager, so an agent working on one
      cannot disturb another.
  - name: Files
    description: Upload and download files
  - name: Templates
    description: Author, build, and launch reproducible computers from templates
  - name: Chat
    description: Run an agent on a computer through OpenAI-compatible chat completions.
  - name: Workflows
    description: >-
      Routines that run the same way every time: a start, then steps. Make them
      from plain words or lines, check them, run them and follow their runs (in
      preview).
paths:
  /computers/{id}/ssh:
    post:
      tags:
        - Computers
      summary: Turn on SSH
      description: >-
        Saves your public key and turns Direct SSH on (or updates the key). The
        keys you send replace the keys on the computer; if the answer asks for a
        restart, the old keys keep working until the computer restarts. Linux
        computers only. Owners and editors only.
      operationId: enableComputerSsh
      parameters:
        - name: id
          in: path
          required: true
          description: Computer ID. Accepts the computer's UUID or its `instance_id`.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - public_key
              properties:
                public_key:
                  type: string
                  description: >-
                    One or more OpenSSH public keys, one per line, 16 KB at
                    most: `ssh-ed25519`, `ssh-rsa`, `ecdsa-sha2-*`,
                    `sk-ssh-ed25519@openssh.com` or
                    `sk-ecdsa-sha2-*@openssh.com`. Never a private key.
            example:
              public_key: >-
                ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKeyOnlyForDocs
                you@laptop
      responses:
        '200':
          description: Saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  enabled:
                    type: boolean
                  authorized_key_set:
                    type: boolean
                  ssh_host_port:
                    type:
                      - integer
                      - 'null'
                    description: The computer's SSH port, when the server reported it.
                  pending:
                    type: boolean
                    description: >-
                      True when the key could not be put on the running computer
                      yet. It lands on the next start.
                  requires_restart:
                    type: boolean
                    description: >-
                      Same as `pending`: restart the computer once to use the
                      key.
              example:
                enabled: true
                authorized_key_set: true
                ssh_host_port: 20314
                pending: false
                requires_restart: false
        '400':
          description: >-
            The computer isn't Linux, or `public_key` is missing, empty, larger
            than 16 KB, or not a valid public key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                os:
                  summary: Not Linux
                  value:
                    error: Direct SSH isn’t supported on Windows computers.
                    code: SSH_UNSUPPORTED_OS
                key:
                  summary: Not a public key
                  value:
                    error: >-
                      Not a valid SSH public key: "-----BEGIN OPENSSH PRIVATE
                      KEY-----"…
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/TrialInactive'
        '403':
          description: >-
            A share link guest, a Can chat member, someone outside the
            computer's workspace, or an API key scoped to another workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                view-only:
                  summary: Can chat member
                  value:
                    error: >-
                      This workspace is view-only. Ask the owner for write
                      access (workspace_read_only).
                no-access:
                  summary: Not in the workspace
                  value:
                    error: You do not have access to this workspace.
                scoped-key:
                  summary: Key for another workspace
                  value:
                    error: >-
                      This API key cannot access this workspace
                      (workspace_scope_mismatch).
                guest:
                  summary: Share link guest
                  value:
                    error: Sign up to create your own workspace.
                    code: GUEST_RESTRICTED
        '404':
          description: No computer with this ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Desktop not found
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          description: Saving failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Failed to set SSH
        '503':
          $ref: '#/components/responses/AuthUnavailable'
components:
  schemas:
    Error:
      type: object
      description: >-
        The base error body. Every failure carries `error`; individual endpoints
        add the fields named in the schemas below.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable message.
          example: Access denied
        code:
          type: string
          description: >-
            Machine-readable reason. Present on the failures that define one,
            absent otherwise.
    RateLimited:
      type: object
      required:
        - error
        - code
        - limit
        - retry_after
      properties:
        error:
          type: string
          description: Which limit, in plain words, and when to try again.
        code:
          type: string
          const: rate_limited
        limit:
          type: string
          enum:
            - computer_create_per_minute
            - computer_create_per_hour
            - computer_create_per_day
            - computer_lifecycle_per_minute
            - computer_lifecycle_per_computer_per_minute
            - computer_control_per_minute
            - computer_control_per_computer_per_minute
            - chat_runs_per_minute
            - chat_runs_concurrent
            - workspace_create_per_hour
            - api_other_per_minute
        retry_after:
          type: integer
          minimum: 1
          description: Seconds to wait.
      example:
        error: >-
          Too many API requests this minute (120 a minute on your plan). Try
          again in 12 seconds.
        code: rate_limited
        limit: api_other_per_minute
        retry_after: 12
  responses:
    Unauthorized:
      description: 'No usable credential. Send `Authorization: Bearer $ORGO_API_KEY`.'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  docs:
                    type: string
                    format: uri
                    description: 'How to sign in: `https://www.orgo.ai/auth.md`.'
          examples:
            invalid-key:
              summary: The key is not one of yours
              value:
                error: Invalid API key
                docs: https://www.orgo.ai/auth.md
            no-credential:
              summary: No key and no session
              value:
                error: Authentication required
                docs: https://www.orgo.ai/auth.md
      headers:
        WWW-Authenticate:
          description: '`Bearer realm="Orgo API"`.'
          schema:
            type: string
    TrialInactive:
      description: >-
        The computer is a free trial computer whose trial is no longer active,
        or it is paid for by its own subscription or dedicated purchase and that
        payment has lapsed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            trial:
              summary: Trial no longer active
              value:
                error: Choose a plan to continue.
            payment:
              summary: The computer's own payment has lapsed
              value:
                error: Manage this computer’s payment in Account → Usage.
    RateLimited:
      description: >-
        Over one of the account's plan rate limits (`rate_limited`): `limit`
        names it, and `retry_after` and `Retry-After` say how many seconds to
        wait. Limits are per account, the workspace owner's when the request
        acts on a computer or a workspace, and set by its plan. See [Account
        limits and rate limits](/guides/account-limits#plan-rate-limits).
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimited'
    AuthUnavailable:
      description: >-
        Orgo could not verify the credential because of a server-side fault,
        such as a database outage. Retry after `Retry-After`. Do not rotate the
        key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: >-
              Service temporarily unavailable. The database is not accepting
              requests. Retry shortly.
      headers:
        Retry-After:
          description: Seconds to wait before retrying. Always `5`.
          schema:
            type: string
            example: '5'
  headers:
    RetryAfter:
      description: Seconds to wait before asking again.
      schema:
        type: integer
        minimum: 1
    RateLimitLimit:
      description: The tightest limit this request counts against.
      schema:
        type: integer
    RateLimitRemaining:
      description: How many are left of it in this window.
      schema:
        type: integer
    RateLimitReset:
      description: Seconds until its window starts again.
      schema:
        type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication. Get your key at orgo.ai/workspaces

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.