This function lists the server's SSH keys.
Warning:
Only the root
account can use this function, and it only affects the root
keys. To perform this function on a regular user account, call the cPanel API
2 SSH::listkeys
function through the WHM API.
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ listsshkeys
{- "data": {
- "keys": [
- {
- "authorized": 0,
- "comment": "REPO username@example.com",
- "ctime": 1416596824,
- "file": "TestKey",
- "mtime": 1416596824,
- "private": 1,
- "text": "ssh-rsaXXXXX3XXXX1XX2XXXXXXXXXXXXXXxXXXX6XXXXX90X41X7XXXXX02XXXXX8XXXX54XXXXXXXXXXX2X07XXXXXXXXXXX7XXXX4XXX2X98XXXX98X80XXXXXXX7X/X4XXXXxX1XXXXXXXXXXXxXXXXXXXXX6+4XXXX36XXXXX3XXXXXX1XXXXXXX/X7+XX1XX6XXXX0XXXXXXX0XXXXXXXX+XxX99X7X2XXXXXX03xXXXXX0XXXXXXXXXX9XXXXXXX9XXXXXXXXXXXX/XXXXX07XXXXX3XXXXXX5XXX+/XXXXXXXXXXXXX3XxXXXXXXXXXXXX6XXXXXXXXXXXX2XXXXXXXXXXXXXXXXX3XX+XXXX3XXXXXXX== REPO username@example.com"
}
]
}, - "metadata": {
- "command": "listsshkeys",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}