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

# SSH

> Run captured programs on any machine reachable over SSH.

What to install and a runnable Python example. The settings, how the workspace connects and the notes are on [SSH](https://docs.mirage.strukto.ai/home/setup/machine/ssh.md), shared by both SDKs.

## Install

```bash theme={null}
pip install 'mirage-ai[ssh]'
```

## Usage

`captures` defaults to [`@external`](https://docs.mirage.strukto.ai/home/setup/machine/overview#captures):
every program Mirage does not have itself. Name `@python` to run
Python on the machine too.

```python theme={null}
from mirage import RAMVFS, MountMode, Workspace

ws = Workspace(
    {"/data": RAMVFS()},
    mode=MountMode.EXEC,
    machines={
        "box": {
            "provider": "ssh",
            "host": "mybox",
            "username": "deploy",
            "identity_file": "~/.ssh/id_ed25519",
            "captures": ["@python", "@external"],
        }
    },
)
await ws.shell("python3 -c 'print(1 + 1)'")
```


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