Description
This function deletes an SSH key.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
name |
string |
Required The SSH key's filename. |
A valid string. |
user |
pub |
string |
Whether to retrieve the public or private key. This value defaults to 0. |
|
0 |
Returns
Return |
Type |
Description |
Possible values |
Example |
leave_authorized |
string |
The SSH key that will remain authorized. |
|
null |
name |
string |
The SSH key's filename. |
A string that contains the fingerprint and file location. |
user |
keyfile |
string |
The SSH key file's former location. |
A valid filepath. |
/home/example/.ssh/user |
reason |
string |
A reason for failure. Note: This function only returns areason value if it failed. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |