---
title: SSH
description: Configure SSH access to Studios.
canonical: 'https://lightning.ai/docs/cli/stable/command-details/ssh'
---
# SSH {#ssh}

Configure SSH access to Studios.

**Usage:**

```console
lightning ssh [OPTIONS] COMMAND [ARGS]...
```

## Commands {#ssh-commands}

| Command | Description |
| --- | --- |
| [`configure`](#ssh-configure) | Get SSH config entry for a studio. |
| [`generate`](#ssh-generate) | Get SSH config entry for a studio. |

## lightning ssh configure {#ssh-configure}

Get SSH config entry for a studio.

**Usage:**

```console
lightning ssh configure [OPTIONS]
```

### Options {#ssh-configure-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--name` | `TEXT` | no | — | Studio to use. Falls back to the current Studio or configured default. |
| `--teamspace` | `TEXT` | no | — | The teamspace the studio is part of. Should be of format <OWNER>/<TEAMSPACE\_NAME>. If not specified, tries to infer from the environment (e.g. when run from within a Studio.) |
| `--overwrite` | — | no | — | Whether to overwrite the SSH key and config if they already exist. |

## lightning ssh generate {#ssh-generate}

Get SSH config entry for a studio.

**Usage:**

```console
lightning ssh generate [OPTIONS]
```

### Options {#ssh-generate-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--name` | `TEXT` | no | — | Studio to use. Falls back to the current Studio or configured default. |
| `--teamspace` | `TEXT` | no | — | The teamspace the studio is part of. Should be of format <OWNER>/<TEAMSPACE\_NAME>. If not specified, tries to infer from the environment (e.g. when run from within a Studio.) |

---

**Navigation**

- Parent: [Command details](/docs/cli/2026.11.04/command-details.md)
