# Enable SSH key for server This function authorizes a public SSH key to access the server. When you call this function, it adds the key to the file. * Do transfer private keys over insecure ports. * Only and -enabled resellers can use this function, and it only affects the public SSH keys. To perform this function on a regular user account, call the cPanel API 2 function via the WHM API. For more information, read our Use WHM API to Call cPanel API and UAPI documentation. Endpoint: GET /authorizesshkey Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `authorize` (integer, required) Whether to authorize the public SSH key to access the server. * — Authorize. * — Do authorize. Enum: 1, 0 - `file` (string, required) The public SSH key file's name. * This file exist in the  directory. * If you call the and the parameters, the function the parameter. Example: "sshkey.pub" - `text` (string, required) The text of the SSH public key file. * If you call the and the parameters, the function the parameter. Example: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCys7JbGhkAZ8E4Pmq8D4EBm1UedKK2oMhs3RVIEFRJX6S86Itw6Qmhds62LNGrxuVL11W6v25+maIiBhXnslyQpd838tHyAC7J/SJojDid8acovX/4xgJQaJHLAh9tLgyQXnNhIxIGJ4nVZ+8OqM2Vb1Cps+E5H17ivG07PXnVPEvwMaeWkm2DnGgSy5kmjVpNKlj9GWFCn/SJd7up7QnbGKoz87pxKDs3esp+ziuPEAJHLeXnKHWPVukQgtRUpUBdqkCvu5hUkhpaiWmBR8yxajkxbSObPw+ZkELhmm+fQseOfEbrwToMRJCO7gAKwBtNi7OhyFM7YFrvdo0xh6cn" - `options` (string) A comma-separated list of options to include with the public SSH key. For a list of options, read the OpenBSD manaual. This parameter defaults to no options. Example: "agent-forwarding,cert-authority" ## Response 200 fields (application/json): - `data` (object) - `data.authorized` (integer) Whether the public SSH key has authorization. * — Authorized. * — authorized. Enum: 1, 0 - `data.file` (string) The public SSH key file's name. Example: "sshkey.pub" - `metadata` (object) - `metadata.command` (string) The method name called. Example: "authorizesshkey" - `metadata.reason` (string) The reason the API function failed when the field is . This field may display a success message when a function succeeds. Example: "OK" - `metadata.result` (integer) * — Success. * — Failed. Check the field for more details. Enum: 1, 0 - `metadata.version` (integer) The version of the API function. Example: 1