> For the complete documentation index, see [llms.txt](https://docs.nebulablock.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nebulablock.com/products/gpu-cloud/ssh-keys.md).

# SSH Keys

Generate an SSH key pair, add it to your Nebula Block account, and use it to log into your instances.

SSH keys authenticate you to your instances. They are more secure than passwords, and Nebula Block needs one on file before it can hand you a machine you can log into. Managing them is free — add as many as you like.

## Generate a key pair

If you do not already have one:

```bash
ssh-keygen -t ed25519 -C "you@example.com"
```

This writes a private key to `~/.ssh/id_ed25519` and a public key to `~/.ssh/id_ed25519.pub`. **Only the public key is uploaded to Nebula Block** — never share the private half.

## Add a key to your account

1. Sign in and open [**SSH Keys**](https://console.nebulablock.com/sshKey) in the console.
2. Click to add a key, give it a name, and paste the contents of your `.pub` file.
3. Save. The key is then selectable whenever you deploy an instance.

You can do the same through the API — see [Create SSH Key](/api-reference/platform-api/list-ssh-keys/create-ssh-key.md).

```bash
cat ~/.ssh/id_ed25519.pub
```

## Use a key

Select the key when you create an instance. Once the instance is running, connect with the matching private key:

```bash
ssh -i ~/.ssh/id_ed25519 username@instance-ip
```

The username and public IP are on the instance's detail page in the console.

> **Note:** Some configurations do not support SSH keys yet. For those, a username and password are generated for you and shown on the instance detail page.

## Manage keys

|                                                                               |                         |
| ----------------------------------------------------------------------------- | ----------------------- |
| [List SSH Keys](/api-reference/platform-api/list-ssh-keys.md)                 | `GET /ssh-keys/`        |
| [Create SSH Key](/api-reference/platform-api/list-ssh-keys/create-ssh-key.md) | `POST /ssh-keys/`       |
| [Rename SSH Key](/api-reference/platform-api/list-ssh-keys/rename-ssh-key.md) | `PUT /ssh-keys/{id}`    |
| [Delete SSH Key](/api-reference/platform-api/list-ssh-keys/delete-ssh-key.md) | `DELETE /ssh-keys/{id}` |

Deleting a key from your account does not remove it from instances that are already running.

## See also

* [GPU Cloud Quickstart](/products/gpu-cloud/quickstart.md)
* [Glossary](/resources/glossary.md)
