Create Support SSH key

This function installs an SSH key from the cPanel Customer Portal.

Note:

This function is not available through the command line. You must call it as a request body.

SecurityBasicAuth
Request
query Parameters
secure_id
required
string

The support ticket's secure ID token.

Example: secure_id=rofh411bv8
server_num
required
integer >= 1

The server's support ticket ID number.

Example: server_num=1
ticket_id
required
integer >= 1

The support ticket's ID number.

Example: ticket_id=999999999
ssh_username
string

The username for incoming SSH connections before they escalate to the root user. If you do not specify a value, the function retrieves the user from the support ticket.

Example: ssh_username=username
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/ticket_grant
Request samples
https://hostname.example.com:2087/cpsess##########/json-api/ticket_grant?api.version=1&ticket_id=999999999&secure_id=rofh411bv8&server_num=1
Response samples
application/json
{
  • "data": {
    • "auth_status": "AUTHED",
    • "auth_time": 1477338450,
    • "chain_status": "ACTIVE",
    • "csf_wl_status": "ACTIVE",
    • "host_access_wl_status": "ACTIVE",
    • "hulk_wl_status": "ACTIVE",
    • "non_fatals": [ ],
    • "server_name": "example",
    • "server_num": 1,
    • "ssh_username": "username",
    • "ticket_id": 999999999,
    • "ticket_status": "OPEN"
    },
  • "metadata": {
    • "command": "ticket_grant",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}