---
title: "ezgh compute ssh-keys create"
description: "Import a public key for instances to launch with."
---

> 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.

# ezgh compute ssh-keys create

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh compute ssh-keys create <name> --public-key <file|-> [flags]
```

Import an OpenSSH public key from a file (such as ~/.ssh/id_ed25519.pub), or stdin with -. Ed25519, ECDSA (P-256, P-384, P-521) and RSA of at least 2048 bits are taken. A project has each key once (ssh_key_exists). Only the public key is sent.

Part of [`ezgh compute ssh-keys`](/cli/reference/compute-ssh-keys).

## Examples

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

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--public-key` | string |  | the public key file, - for stdin (required) |
| `--tag` | string, repeatable |  | a tag, key=value (repeat) |

This command also takes the [global flags](/cli/reference#global-flags).

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