SSH Keys

Add an SSH public key (computes fingerprint)

Changed on

Registers an OpenSSH public key for the org, stores it in canonical form with its computed fingerprint, and returns it with its new id and creation time. An invalid key answers 400 INVALID_KEY, and a key that is already registered answers 409 KEY_EXISTS.

Requires the sshkey.write permission. See Permissions for the roles and API key permissions that include it.

post/v1/orgs/{orgId}/ssh-keys/create

Request

  • Base URL
    https://api.openrelay.inc
  • URL
    https://api.openrelay.inc/v1/orgs/{orgId}/ssh-keys/create
  • Auth
    HTTP bearer

Path parameters

orgIdstring required

Request body

namestring required
publicKeystring required

Exactly one OpenSSH public key on a single line: the key type, the base64 key, and an optional comment, as in a .pub file. The comment must be printable text without control characters, ,, $, % or a grapheme-prepend letter (such as U+0D4E), and authorized_keys options such as from= are refused. The key is stored and returned in canonical form, with single spaces between the fields and the comment in Unicode NFC.

Response

Added

attachedVmCountinteger

Number of live (non-terminated) VMs this key is attached to. Zero means the key is not scoped to any VM. The dashboard shows an "in use" indicator and warns before deleting a key that is in use.

blockingVmsstring[]

Names of VMs for which this is the only key that still resolves to a live org key. Deleting the key is refused (409) while this is non-empty; attach another key to those VMs first.

createdAtstring required
fingerprintstring required
idstring required
namestring required
publicKeystring required

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status