Create SSH key
Changed onAdd 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.
Request
- Base URLhttps://api.rafftechnologies.com
- URLhttps://api.rafftechnologies.com/api/v1/ssh-keys
- AuthAPI key in header X-API-Key
Request body
Example request
{
"name": "laptop",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... user@host"
}Response
SSH key created
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
- info
- warning
added the new
sk-ecdsa-sha2-nistp256@openssh.comenum value to the/response property for the response status - warning
added the new
sk-ssh-ed25519@openssh.comenum 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
- warning