Description
This function retrieves 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. Note: You cannot use the following names:
|
user |
pub |
string |
Whether to retrieve the public or private key. This value defaults to 0. |
|
0 |
Returns
Return |
Type |
Description |
Possible values |
Example |
name |
string |
The SSH key's filename. |
A string that contains the fingerprint and file location. |
user |
key |
string |
The SSH key. |
A valid SSH key. |
|
reason |
string |
A reason for failure. Note: This function only returns a reasonvalue if it failed. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |