---
title: "SSH keys"
description: "Import SSH public keys into a project and launch instances that accept them for login."
---

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

# SSH keys

An SSH key is a public key in a project. Instances launched with it accept it for the image's
[login user](/compute/images). In the console, open **Compute**, then **SSH keys**.

## Import a key

In the console, choose **Add SSH key**, then paste the public key or choose its `.pub` file. With
the API, call [ImportSshKey](/compute-api/ImportSshKey/) with `name` and `publicKey`. From
the CLI:

```sh
ezgh compute ssh-keys create laptop --public-key ~/.ssh/id_ed25519.pub
```

- **Accepted:** Ed25519, ECDSA (P-256, P-384 or P-521) and RSA of at least 2048 bits, as one
  OpenSSH line (`ssh-ed25519 AAAAC3… laptop`).
- **One per fingerprint:** a key already in the project is `409 ssh_key_exists`. The fingerprint
  (`SHA256:…`) is on the key's page.
- Only the public key is sent. EZGH Cloud never sees or makes private keys.

## Use a key

Choose keys under **SSH keys** when you [launch](/compute/instances#launch), or give their IDs in
`sshKeyIds` (0–10 keys; the CLI's `--ssh-key`, by name or ID), which needs `compute.sshKeys.use` on each. The key's page lists the
instances that use it. An instance launched without a key can only be reached through what its
[user data](/compute/user-data-and-metadata) sets up.

Keys are installed at launch. To change the keys on a running instance, edit
`~/.ssh/authorized_keys` in the guest.

## Delete a key

Deleting a key ([DeleteSshKey](/compute-api/DeleteSshKey/), `ezgh compute ssh-keys delete`) stops new launches from using
it. Instances launched with it keep it.

Source: https://docs.ezghcloud.com/compute/ssh-keys/index.mdx
