> For the complete documentation index, see [llms.txt](https://doc.cloudbit.ch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.cloudbit.ch/products/compute/keypairs.md).

# Keypairs

Using Keypairs (SSH keys) allows you to secure SSH access to instances (VMs). You can generate a key pair on a client from which you will connect to instances via SSH. The private key will be stored on the client, and the public key will need to be uploaded and specified during instance creation. It will be injected into the instance by cloud-init and used for OpenSSH authentication.

## Quickstart

1. Start by clicking the **Wizard** button in the [Control Panel](https://my.cloudbit.ch). Click **Create Key Pair.**<br>
2. Name your Keypair.<br>
3. Under **Keypair**, paste your public key in the empty field or upload a file by clicking on "or select file". The Keypair should have the following format:\
   \
   `ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClkRUh/9D7QmZSPvWqJc1NBqs07t77s8lAwrVzsZMgP/vFZJtXQCRJ2NTxQOoJk7q1QEPqJtidIIz/oau2QkvOWvWB/gorbI2iCDDkK1j9XBsnp+DVmu126lAcGUb/V0U/5J3PCHYE2K4gKNoiQShIQbp/7JTsNCxwLaz2oZ5/brG5X+it6triEhRG/lqh6QiVvGWiQPaJTp6mBSQQF6AAaEMXLXeQkBiVW+UrV6bSC+tV5A5aBMwNP8L90TXl/sBoqlpuDMnIXOPwPt8UFSos/AR7hMl1JueRohuG26PNwwZ2NDCH+Uk3ER4hXZmIWEup99QJA3pmFGhJADIFy/Qh`<br>
4. Click on **Next**. In the summary window, click on **Finish** to complete the process. The new Keypair can now be used when creating new instances.

## Adding Keypairs to an existing instance

For security reasons, you can’t add or modify the Keypairs (SSH keys) on your instance using the control panel after you create it, but you have several options to add and modify them via the command line. If you currently have SSH access to the instance, you can upload keys:

* **From your local computer, using `ssh-copy-id`**, which is included in many Linux distribution's OpenSSH packages.<br>
* **From your local computer by piping the contents of the public key** into the `~/.ssh/authorized_keys` file. This is a good choice if you don’t have `ssh-copy-id`.<br>
* **By SSHing to your instance and adding the public key manually**, which is necessary if you do not have password-based SSH access.

## Regional Availability

Keypairs are available in all regions.

## Limitations

Keypairs are only supported for Linux and Unix-based instances.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.cloudbit.ch/products/compute/keypairs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
