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

# ChatGPT

> Connect the ChatGPT desktop app to an Ona environment over SSH.

<Note>This feature is in preview.</Note>

ChatGPT connects to Ona environments over SSH and runs tasks against the remote filesystem and shell.

## Prerequisites

1. The [ChatGPT desktop app](https://chatgpt.com/download/) installed.
2. The [Ona CLI](/ona/integrations/cli) installed and authenticated.
3. Codex access in the ChatGPT account and workspace you want to use.

## Connecting to an environment

1. In the Ona dashboard, select **Open in ChatGPT**. Ona opens ChatGPT's SSH connections screen and shows the required commands.
2. Run the commands shown by Ona in a local terminal. They sign in to the Ona CLI, add the environment to your SSH configuration, and verify the SSH connection.
3. Select **Add environment in ChatGPT** in the Ona dialog.
4. In ChatGPT, enable the SSH connection and choose the project folder in the environment.

ChatGPT requires the `codex` command to be installed and authenticated on the remote host. See [Connect to an SSH host](https://learn.chatgpt.com/docs/remote-connections#connect-to-an-ssh-host) for the current ChatGPT requirements.

## Troubleshooting

<Accordion title="SSH config entry not found">
  Return to the Ona setup dialog and run `ona environment ssh-config` in a local terminal. Verify the connection using the environment-specific `ssh` command shown in the dialog, then select **Add environment in ChatGPT** again.
</Accordion>

<Accordion title="The Ona CLI has no active context">
  Run `ona login`, complete authentication in your browser, then rerun `ona environment ssh-config`.
</Accordion>

<Accordion title="The codex command is not available on the remote host">
  Install and authenticate Codex in the environment before enabling the SSH connection in ChatGPT. Follow the remote host setup in [ChatGPT's remote connections documentation](https://learn.chatgpt.com/docs/remote-connections#connect-to-an-ssh-host).
</Accordion>
