SSH keys
The SSH public keys that new SVMs of the organization get when they are created
Resource, request and plan limits are listed on Limits.
Download OpenAPI specification · Version 0.1.0
List the SSH keys
Returns the SSH public keys of the organization. SVMs created from now on get them in ~/.ssh/authorized_keys; existing SVMs keep their own file.
Response Body
The SSH keys of the organization, oldest first; [] when there are none.
application/json- response
The SSH keys of the organization, oldest first; [] when there are none.
[index: integer]?One SSH public key of the organization.
curl -X GET 'https://api.slashinfra.com/ssh-keys'[ { "added_by": "ada@example.com", "created_ms": 1767225600000, "fingerprint": "SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU", "id": "k5x2m8q1z0", "name": "laptop", "public_key": "string", "type": "ssh-ed25519" }]Add an SSH key
Adds an SSH public key to the organization. SVMs created from now on get it in ~/.ssh/authorized_keys; existing SVMs do not change.
Request Body
- body
name?stringThe optional name of the key in the list; without one, the key comment is the name, else its type.
1 <= length <= 100public_key*stringOne public key line, as ~/.ssh/id_ed25519.pub holds it (<type> <base64> [comment]); Ed25519, ECDSA, their security-key forms and RSA of at least 2048 bits are accepted.
Response Body
One SSH public key of the organization.
application/json- response
One SSH public key of the organization.
added_by*stringWho added the key: the email of a person, or API key "<name>" for an organization API key.
created_ms*integerWhen the key was added, in milliseconds since the Unix epoch.
fingerprint*stringThe SHA-256 fingerprint, as ssh-keygen -lf prints it.
id*stringThe key id.
name*stringThe name of the key.
public_key*stringThe key without its comment: <type> <base64>.
type*stringThe key type.
curl -X POST 'https://api.slashinfra.com/ssh-keys' \ -H 'Content-Type: application/json' \ -d '{ "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl ada@laptop"}'{ "added_by": "ada@example.com", "created_ms": 1767225600000, "fingerprint": "SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU", "id": "k5x2m8q1z0", "name": "laptop", "public_key": "string", "type": "ssh-ed25519"}Delete an SSH key
Deletes an SSH public key of the organization. SVMs created from now on do not get it; existing SVMs keep the keys in their own ~/.ssh/authorized_keys.
Path Parameters
id*stringThe id of the key, from the list.
1 <= lengthResponse Body
The key is deleted, with no body; new SVMs no longer get it, and existing SVMs keep their own file.
response?stringtext/plainThe key is deleted, with no body; new SVMs no longer get it, and existing SVMs keep their own file.
curl -X DELETE 'https://api.slashinfra.com/ssh-keys/string'"string"curl -X GET 'https://api.slashinfra.com/ssh-keys'[
{
"added_by": "ada@example.com",
"created_ms": 1767225600000,
"fingerprint": "SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU",
"id": "k5x2m8q1z0",
"name": "laptop",
"public_key": "string",
"type": "ssh-ed25519"
}
]curl -X POST 'https://api.slashinfra.com/ssh-keys' \
-H 'Content-Type: application/json' \
-d '{
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl ada@laptop"
}'{
"added_by": "ada@example.com",
"created_ms": 1767225600000,
"fingerprint": "SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU",
"id": "k5x2m8q1z0",
"name": "laptop",
"public_key": "string",
"type": "ssh-ed25519"
}curl -X DELETE 'https://api.slashinfra.com/ssh-keys/string'"string"