CLISSH Keys
hudl key create <name>
Upload an existing SSH public key, or generate a new one.
Upload an existing SSH public key, or generate a new one. If you provide a --public-key, that key is imported. Otherwise, a new keypair is generated and the private key is returned once (it is not stored on the server).
Usage
hudl key create <name> [flags]Flags
| Flag | Description |
|---|---|
--public-key <key> | The SSH public key content to import (e.g. the contents of ~/.ssh/id_ed25519.pub). |
--type <type> | Key type: ssh or rsa. Defaults to ssh. |
Common flags
| Flag | Description |
|---|---|
--region <code> | Override the active region for this call only. |
--workspace <slug> | Override the active workspace for this call only. |
-o, --output | Output format: table (default), json, yaml, wide, name. |
--idempotency-key <key> | Attach an idempotency key so retries are safe. |
Examples
Import an existing public key:
hudl key create deploy-key \
--public-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... user@host"Import a key from a file:
hudl key create deploy-key \
--public-key "$(cat ~/.ssh/id_ed25519.pub)"Generate a new keypair (the private key is printed to stdout):
hudl key create temp-accessGenerate and save the private key to a file:
hudl key create ci-runner -o json | jq -r '.private_key' > ci-runner.pem
chmod 600 ci-runner.pemAPI reference
This command calls POST /keypairs under the hood. See the full request and response schema in the API reference.