Skip to main content

SSH Certificate Authorities

Create SSH Certificate Authority

Create a new SSH Certificate Authority

Request

POST /ssh_certificate_authorities

Example Request

curl \
-X POST \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"description":"Staging Environment Hosts","private_key_type":"ed25519"}' \
https://api.ngrok.com/ssh_certificate_authorities

Parameters

NameTypeDescription
descriptionstringhuman-readable description of this SSH Certificate Authority. optional, max 255 bytes.
metadatastringarbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes.
private_key_typestringthe type of private key to generate. one of rsa, ecdsa, ed25519
elliptic_curvestringthe type of elliptic curve to use when creating an ECDSA key
key_sizeint64the key size to use when creating an RSA key. one of 2048 or 4096

Response

Returns a 201 response on success

Example Response

{
"created_at": "2024-08-02T07:15:39Z",
"description": "Staging Environment Hosts",
"id": "sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m",
"key_type": "ed25519",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtwyprLd+EmX7/i4wMCF/nZyaemc+iqnokQqZ87XcIC",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m"
}

Fields

NameTypeDescription
idstringunique identifier for this SSH Certificate Authority
uristringURI of the SSH Certificate Authority API resource
created_atstringtimestamp when the SSH Certificate Authority API resource was created, RFC 3339 format
descriptionstringhuman-readable description of this SSH Certificate Authority. optional, max 255 bytes.
metadatastringarbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes.
public_keystringraw public key for this SSH Certificate Authority
key_typestringthe type of private key for this SSH Certificate Authority

Delete SSH Certificate Authority

Delete an SSH Certificate Authority

Request

DELETE /ssh_certificate_authorities/{id}

Example Request

curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/ssh_certificate_authorities/sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m

Response

Returns a 204 response with no body on success

Get SSH Certificate Authority

Get detailed information about an SSH Certficate Authority

Request

GET /ssh_certificate_authorities/{id}

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/ssh_certificate_authorities/sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m

Response

Returns a 200 response on success

Example Response

{
"created_at": "2024-08-02T07:15:39Z",
"description": "Staging Environment Hosts",
"id": "sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m",
"key_type": "ed25519",
"metadata": "{\"region\": \"us-east-1\"}",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtwyprLd+EmX7/i4wMCF/nZyaemc+iqnokQqZ87XcIC",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m"
}

Fields

NameTypeDescription
idstringunique identifier for this SSH Certificate Authority
uristringURI of the SSH Certificate Authority API resource
created_atstringtimestamp when the SSH Certificate Authority API resource was created, RFC 3339 format
descriptionstringhuman-readable description of this SSH Certificate Authority. optional, max 255 bytes.
metadatastringarbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes.
public_keystringraw public key for this SSH Certificate Authority
key_typestringthe type of private key for this SSH Certificate Authority

List SSH Certificate Authorities

List all SSH Certificate Authorities on this account

Request

GET /ssh_certificate_authorities

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/ssh_certificate_authorities

Response

Returns a 200 response on success

Example Response

{
"next_page_uri": null,
"ssh_certificate_authorities": [
{
"created_at": "2024-08-02T07:15:39Z",
"description": "Staging Environment Hosts",
"id": "sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m",
"key_type": "ed25519",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtwyprLd+EmX7/i4wMCF/nZyaemc+iqnokQqZ87XcIC",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m"
}
],
"uri": "https://api.ngrok.com/ssh_certificate_authorities"
}

Fields

NameTypeDescription
ssh_certificate_authoritiesSSHCertificateAuthoritythe list of all certificate authorities on this account
uristringURI of the certificates authorities list API resource
next_page_uristringURI of the next page, or null if there is no next page

SSHCertificateAuthority fields

NameTypeDescription
idstringunique identifier for this SSH Certificate Authority
uristringURI of the SSH Certificate Authority API resource
created_atstringtimestamp when the SSH Certificate Authority API resource was created, RFC 3339 format
descriptionstringhuman-readable description of this SSH Certificate Authority. optional, max 255 bytes.
metadatastringarbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes.
public_keystringraw public key for this SSH Certificate Authority
key_typestringthe type of private key for this SSH Certificate Authority

Update SSH Certificate Authority

Update an SSH Certificate Authority

Request

PATCH /ssh_certificate_authorities/{id}

Example Request

curl \
-X PATCH \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"metadata":"{\"region\": \"us-east-1\"}"}' \
https://api.ngrok.com/ssh_certificate_authorities/sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m

Parameters

NameTypeDescription
idstring
descriptionstringhuman-readable description of this SSH Certificate Authority. optional, max 255 bytes.
metadatastringarbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes.

Response

Returns a 200 response on success

Example Response

{
"created_at": "2024-08-02T07:15:39Z",
"description": "Staging Environment Hosts",
"id": "sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m",
"key_type": "ed25519",
"metadata": "{\"region\": \"us-east-1\"}",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtwyprLd+EmX7/i4wMCF/nZyaemc+iqnokQqZ87XcIC",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2k5okFwpGYjs2O5IRVHTt8DOl2m"
}

Fields

NameTypeDescription
idstringunique identifier for this SSH Certificate Authority
uristringURI of the SSH Certificate Authority API resource
created_atstringtimestamp when the SSH Certificate Authority API resource was created, RFC 3339 format
descriptionstringhuman-readable description of this SSH Certificate Authority. optional, max 255 bytes.
metadatastringarbitrary user-defined machine-readable data of this SSH Certificate Authority. optional, max 4096 bytes.
public_keystringraw public key for this SSH Certificate Authority
key_typestringthe type of private key for this SSH Certificate Authority