Create SSH key
Creates a new SSH key in the server
POST api/servers/{server}/ssh-keys
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | Maximum: 255 |
key | string | required | Must be a valid SSH key |
system_user | string | optional | Must be a valid system user name |
Example request:
curl -X POST "https://ploi.io/api/servers/{server}/ssh-keys" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data '{"name": "New key", "key": "ssh-rsa AAA...", "system_user":"ploi"}'
Example response:
{
"data": {
"id": 2,
"status": "created",
"name": "key",
"key": "ssh-rsa AAA....",
"system_user": "ploi"
}
}