CVMs

Replace CVM SSH keys

Changed on

Replaces the set of SSH keys this CVM authorizes. Optional usernames are resolved to that member's keys and unioned into the set. Keys take effect at the next power-on, or immediately when apply_now restarts the CVM.

put/api/v1/cvms/{cvm_id}/ssh-keys

Request

Path parameters

cvm_idstring required

Request body

ssh_key_idsstring[] required

SSH key hashids to authorize. Must belong to a workspace member. Keys currently authorized but missing here are withdrawn.

usernamesstring[]

Workspace member usernames whose keys are unioned into the set. Each name must be a current member with at least one SSH key.

apply_nowboolean

Restart the CVM so the change takes effect immediately. When false the change applies at the next power-on.

Response

Updated authorized keys

restart_requiredboolean required

True when the stored set has not been applied to the running VM yet

Example response

{
  "keys": [
    {
      "id": "sshkey_0123abcd",
      "owner_user_id": "usr_0123abcd",
      "added_by_user_id": "usr_0123abcd"
    }
  ]
}

Changes