Skip to main content
POST
/
api
/
v1
/
ssh-keys
Generate SSH key pair
curl --request POST \
  --url https://neo.api.projectdiscovery.io/api/v1/ssh-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "algorithm": "ed25519",
  "default_host": "<string>",
  "default_port": 32768,
  "default_username": "<string>",
  "password": "<string>",
  "private_key": "<string>",
  "private_key_passphrase": "<string>",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "algorithm": "ed25519",
  "auth_type": "key",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "default_host": "<string>",
  "default_port": 123,
  "default_username": "<string>",
  "fingerprint": "<string>",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "public_key": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.neo.projectdiscovery.io/llms.txt

Use this file to discover all available pages before exploring further.

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)