SSH Keys
Create an SSH key
Creates a new SSH key with the given name and public_key. Once an SSH key is created, it can be used in other calls such as creating Servers.
post/ssh_keys
Request
- Base URL: https://api.hetzner.cloud/v1
- URL: https://api.hetzner.cloud/v1/ssh_keys
- Auth: HTTP bearer
Request body
Example request
{
"name": "My ssh key",
"public_key": "ssh-rsa AAAjjk76kgf...Xt",
"labels": {
"environment": "prod",
"example.com/my": "label",
"just-a-key": ""
}
}Response
Request succeeded.
Example response
{
"ssh_key": {
"id": 42,
"name": "my-resource",
"fingerprint": "b7:2f:30:a0:2f:6c:58:6c:21:04:58:61:ba:06:3b:2f",
"public_key": "ssh-rsa AAAjjk76kgf...Xt",
"labels": {
"environment": "prod",
"example.com/my": "label",
"just-a-key": ""
},
"created": "2016-01-30T23:55:00Z"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.