Skip to main content
POST
Generate SSH key pair

Authorizations

Authorization
string
header
required

JWT authentication token

Body

application/json
name
string
required

Unique name for this SSH key (letters, digits, underscores, hyphens, dots only)

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9][A-Za-z0-9_.-]*$
algorithm
enum<string>

Key generation algorithm. Required for generated-key auth. Mutually exclusive with password and private_key.

Available options:
ed25519,
rsa-2048,
rsa-4096,
ecdsa-256,
ecdsa-384,
ecdsa-521
default_host
string

Default SSH host for connections using this key

Maximum string length: 255
default_port
integer

Default SSH port (defaults to 22)

Required range: 1 <= x <= 65535
default_username
string

Default SSH username for connections using this key

Maximum string length: 128
password
string

SSH password for password-based auth. Mutually exclusive with algorithm and private_key. Encrypted at rest.

Required string length: 1 - 1000
private_key
string

Existing OpenSSH/PEM private key to import. Mutually exclusive with algorithm and password. Encrypted at rest.

Required string length: 1 - 20000
private_key_passphrase
string

Optional passphrase for private_key. Used only during import.

Maximum string length: 1000
project_id
string<uuid>

Optional project ID for project-scoped key

Response

SSH key pair generated successfully

algorithm
enum<string>
required
Available options:
ed25519,
rsa-2048,
rsa-4096,
ecdsa-256,
ecdsa-384,
ecdsa-521,
password
auth_type
enum<string>
required

Authentication type (key = generated key pair, password = password-based)

Available options:
key,
password
id
string<uuid>
required
name
string
required
created_at
string<date-time>
default_host
string | null
default_port
integer | null
default_username
string | null
fingerprint
string | null

SHA256 fingerprint of the public key (null for password auth)

project_id
string<uuid> | null
public_key
string | null

OpenSSH authorized_keys format public key (null for password auth)