4 functions, invoked through the cpanel_uapi tool.
scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="KnownHosts", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.
This function updates a host's entry in the cPanel account's /home/user/.ssh/known_hosts file.
host_namemixedRequired
The host to update.
portintegerOptional
The SSH port to use.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
hostarray<object>
An array of objects containing the host's information.
hostany
The updated host and its associated key value.
keystring
The host's key.
linestring
The host's entry in the /home/user/.ssh/known_hosts file, where user is the cPanel account username. A valid entry that includes the hostname or IP address, the key's algorithm, and the public key.
metaobject
An object containing metadata about the host's public key.
algorithmstring
The key's algorithm.
bodystring
The host's public key.
md5string
The key's MD5 fingerprint.
md5-printablestring
A human-readable version of the key's MD5 fingerprint.
sha256string
The key's SHA-256 fingerprint.
sha256-printablestring
human-readable version of the key's SHA-256 fingerprint.
A human-readable version of the key's SHA-256 fingerprint.
statusinteger
Whether the host already exists in the /home/user/.ssh/known_hosts file, where user is the cPanel account username. 1 — Exists. 0 — The host does not already exist, or the system must re-register the hostname.