SSH keys
Create or import SSH key
This method creates an SSH key that can be used for Linux compute instance creation. An SSH key can be created in two ways: generated by emma or imported by the user.
If you want to generate a key, specify two fields: name and keyType (RSA or ED25519). The key will be generated, and you will receive a private key in the response. The private key will be shown only once, so copy and save it to connect to the Linux compute instances.
If you want to import an existing SSH key, specify two fields: name and key. In the key field, insert your public SSH key as a string. It will be imported.
post/v1/ssh-keys
Request
- Base URLhttps://api.emma.ms/external
- AuthHTTP bearer
Request body
Example request
{
"name": "mykey",
"keyType": "RSA"
}Response
Successful operation
Example response
{
"id": 60,
"name": "mykey",
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMwmR5qB5VU9X4VYQJjXDT3qketmrrqEABSNAEEkfTtOtIZrKJmMST9bEus/5FFm9b5w5unyZaW39PUe/QDrxwB8Y3b+DTyA1LcRzd2UhCQsybh9DKbDb+HX0lKrgIeUkadwIq5gE2nx3VBQUifa2BGYC7b+FtFLjtHaOwWIvuQC7AYozCB+B69P3q8tK0D9UXlLyGGsBe8MYjl0mV9IumWS7WBz2VDqLhAvFIzpcERVstepLM9Y4mePpDhfQqt85MRIrqTWikhZExwbRmbSFCZHPi85Os2oxSHoXH1NMSBNEt3yJB4Cn5f2nBV45ysd0HcQmn7eLmRPzbkmhfYoOL Lego%20Group@localhost",
"fingerprint": "f2:60:34:c8:34:b2:a3:da:22:f9:12:f9:03:f0:33:c0",
"keyType": "RSA",
"createdAt": "2021-11-26T14:54:11",
"createdByName": "Automation User",
"createdById": 123
}Changes
No recorded changes to this operation across all 1 revision of this API.