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

# SSH Commands

> CLI reference for SSH access to instances

Connect to your cluster's instances over SSH with the `tp ssh` command.

## tp ssh

SSH into a running instance.

```bash theme={null}
tp ssh <instance_id> [ssh_args...]
```

### Arguments

| Argument      | Description                                                                                                              |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `instance_id` | Instance ID to SSH into                                                                                                  |
| `ssh_args`    | Additional [SSH arguments](https://www.man7.org/linux/man-pages/man1/ssh.1.html) to pass through (e.g. `-i`, `-o`, `-v`) |

### Examples

Connect to an instance:

```bash theme={null}
tp ssh i-abc123
```

Connect with a specific SSH key:

```bash theme={null}
tp ssh i-abc123 -i ~/.ssh/my_key
```

Connect with verbose output for debugging:

```bash theme={null}
tp ssh i-abc123 -v
```

<Warning>
  `tp ssh` requires an **instance ID** (e.g., `i-abc123`), not a cluster ID (e.g., `c-abc123`). A cluster can have multiple instances, so you need to specify which one to connect to. Use `tp cluster info <cluster_id>` to find the instance IDs for your cluster.
</Warning>

<Tip>
  If you save an SSH key to your account with `tp me sshkey add`, you won't need to pass `-i` each time you create a cluster. See [account commands](/cli/account-commands) for details.
</Tip>

## Generating SSH Keys

If you don't have SSH keys, generate them:

```bash theme={null}
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519
```

This creates:

* `~/.ssh/id_ed25519` - Your private key (keep secure!)
* `~/.ssh/id_ed25519.pub` - Your public key (used when creating clusters)

## Next Steps

* Manage your SSH keys with [`tp me sshkey`](/cli/account-commands#tp-me-sshkey)
* See [cluster commands](/cli/cluster-commands)
