# nodus create sshkey

> Add an SSH public key, or generate a key pair and add it

Source: https://nodus-platform-site.pages.dev/docs/reference/cli/nodus_create_sshkey/
Build revision: 211ad9f836655b1c3a2668c4693e442471f28614

## nodus create sshkey

Add an SSH public key, or generate a key pair and add it

```plaintext
nodus create sshkey [NAME] [flags]
```

### Examples

```plaintext
  nodus create sshkey laptop --from-file ~/.ssh/id_ed25519.pub
  nodus create sshkey --generate
```

### Options

```plaintext
      --display-name string         A label for the console
      --dry-run string[="server"]   server returns the estimate without creating; client prints the manifest (default "none")
      --from-file string            OpenSSH public key file to add, or - for standard input
      --generate                    Create a new Ed25519 key pair here and add its public key
  -h, --help                        help for sshkey
      --key-file string             With --generate: where to write the private key (the public key goes next to it, with .pub) (default "~/.ssh/id_ed25519")
  -o, --output string               Output format: name, json, yaml, or estimate (with --dry-run=server)
```

### Options inherited from parent commands

```plaintext
      --context string   Context from the config file to use
      --org string       Organization (selects the context for that org)
  -p, --project string   Project to work in
  -v, --verbose          Log each API request (never credentials)
```

### SEE ALSO

* [nodus create](https://nodus-platform-site.pages.dev/docs/reference/cli/nodus_create/) - Create resources from manifests or with a typed generator

### Tested examples

These invocations run in CI against the CLI’s fake API.

Terminal window

```sh
nodus create sshkey laptop --from-file laptop.pub
nodus create sshkey fresh --generate --key-file id_fresh
```
