SSH Keys

Add an SSH public key to your account. Pass its id (or the key itself) in the ssh_keys array on VM create or reinstall to enable key-based login.

One key per saved key: the whole line of a .pub file. Accepted types: ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, ssh-rsa (1024 bits or more) and the security key types sk-ssh-ed25519@openssh.com and sk-ecdsa-sha2-nistp256@openssh.com. DSA keys, authorized_keys options and anything that is not a public key are refused. Each key can be saved once per account: saving it again answers 409 with the name it already has.

post/api/v1/ssh-keys

Request

  • Base URL
    https://api.rafftechnologies.com
  • URL
    https://api.rafftechnologies.com/api/v1/ssh-keys
  • Auth
    API key in header X-API-Key

Request body

namestring required

SSH key display name

public_keystring required

One SSH public key, the whole line of a .pub file. Accepted types: ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, ssh-rsa (1024 bits or more) and the security key types sk-ssh-ed25519@openssh.com and sk-ecdsa-sha2-nistp256@openssh.com.

Example request

{
  "name": "laptop",
  "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... user@host"
}

Response

SSH key created

successboolean

Example response

{
  "data": {
    "name": "laptop",
    "fingerprint": "SHA256:1+VorffDlD3U7juTRFPvwlXH1Ae81o/2yTnpEN7t26w",
    "servers": [
      {
        "name": "web-01",
        "status": "active"
      }
    ]
  }
}

Changes

    • info

      added the optional property / to the response with the status

    • warning

      added the new sk-ecdsa-sha2-nistp256@openssh.com enum value to the / response property for the response status

    • warning

      added the new sk-ssh-ed25519@openssh.com enum value to the / response property for the response status

    • info

      added the non-success 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