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

   
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

{
"id": "sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"created_at": "2023-07-31T23:17:40Z",
"description": "Staging Environment Hosts",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF2oojx8/x9vM8yBCHJAmoI+srmgAZp9kqFrKNIpAPnH",
"key_type": "ed25519"
}

Fields

   
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_2TMGJ265hqrbNNVK1x0pw3eK30e

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_2TMGJ265hqrbNNVK1x0pw3eK30e

Response

Returns a 200 response on success

Example Response

{
"id": "sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"created_at": "2023-07-31T23:17:40Z",
"description": "Staging Environment Hosts",
"metadata": "{\"region\": \"us-east-1\"}",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF2oojx8/x9vM8yBCHJAmoI+srmgAZp9kqFrKNIpAPnH",
"key_type": "ed25519"
}

Fields

   
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

{
"ssh_certificate_authorities": [
{
"id": "sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"created_at": "2023-07-31T23:17:40Z",
"description": "Staging Environment Hosts",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF2oojx8/x9vM8yBCHJAmoI+srmgAZp9kqFrKNIpAPnH",
"key_type": "ed25519"
}
],
"uri": "https://api.ngrok.com/ssh_certificate_authorities",
"next_page_uri": null
}

Fields

   
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

   
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_2TMGJ265hqrbNNVK1x0pw3eK30e

Parameters

   
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

{
"id": "sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"uri": "https://api.ngrok.com/ssh_certificate_authorities/sshca_2TMGJ265hqrbNNVK1x0pw3eK30e",
"created_at": "2023-07-31T23:17:40Z",
"description": "Staging Environment Hosts",
"metadata": "{\"region\": \"us-east-1\"}",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF2oojx8/x9vM8yBCHJAmoI+srmgAZp9kqFrKNIpAPnH",
"key_type": "ed25519"
}

Fields

   
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