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

# celesto sandbox ssh

> Use celesto sandbox ssh to open a real SSH session into a sandbox when you need SSH behavior instead of the faster Celesto shell.

`celesto sandbox ssh` opens an interactive SSH session to a sandbox. Use it when you need SSH-specific behavior, such as SSH agent forwarding, a custom key, or a user account other than `root`.

## Synopsis

```bash theme={null}
celesto sandbox ssh <sandbox> [OPTIONS]
```

## Arguments

**sandbox** `string` *required*

Name or ID of the sandbox to connect to.

## Options

**--ssh-key** `string`

Path to the SSH private key.

**--ssh-user** `string` (default: root)

SSH user inside the sandbox.

**--boot-timeout** `number` (default: 30)

Seconds to wait if Celesto needs to start the sandbox before connecting.

## Examples

### Connect to a sandbox

```bash theme={null}
celesto sandbox ssh my-sandbox
```

### Use a custom key

```bash theme={null}
celesto sandbox ssh my-sandbox --ssh-key ~/.ssh/work_sandbox
```

### Connect as another user

```bash theme={null}
celesto sandbox ssh ubuntu-box --ssh-user ubuntu
```

## Shell versus SSH

Use [`celesto sandbox shell`](https://celesto.ai/docs/celesto/cli/shell) for the fastest interactive shell on recent Linux images. It uses the Celesto guest agent when available. Use `celesto sandbox ssh` when you specifically need SSH.

## Related commands

* [`celesto sandbox shell`](https://celesto.ai/docs/celesto/cli/shell) - Open the fast shell
* [`celesto sandbox create`](https://celesto.ai/docs/celesto/cli/create) - Create a sandbox
* [`celesto sandbox list`](https://celesto.ai/docs/celesto/cli/list) - Find sandbox names


## Related topics

- [celesto sandbox create](https://celesto.ai/docs/celesto/cli/create.md)
- [celesto sandbox shell](https://celesto.ai/docs/celesto/cli/shell.md)
- [celesto completion](https://celesto.ai/docs/celesto/cli/completion.md)
- [Celesto: secure microVM sandboxes for AI agents](https://celesto.ai/docs/celesto/introduction.md)
- [Troubleshooting guide](https://celesto.ai/docs/celesto/advanced/troubleshooting.md)


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