# Update host in the known_hosts file This function updates a host's entry in the cPanel account's /home/user/.ssh/known_hosts file. Endpoint: GET /KnownHosts/update Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `host_name` (any, required) The host to update. Example: "host.example.com" - `port` (integer) The SSH port to use. Example: 1234 ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "update" - `module` (string) The name of the module called. Example: "KnownHosts" - `result` (object) - `result.data` (object) - `result.data.host` (array) An array of objects containing the host's information. - `result.data.host.host` (any) The updated host and its associated key value. Example: "host.example.com" - `result.data.host.key` (string) The host's key. Example: "ssh-rsa AAAAB3NzaC1yc2AEEEEDAQABAAABAQCsj2bNKTBSpIYDEGk9KxsGh3mySTRgMtXL583qmBpzeQ+jqCMRgBqB98u3z++J1sKlXHWfM9dyhSevkMwSbhoR8XIq/U0tCNyokEi/ueaBMCvbcTHhO7FcwzY92WK4Yt0aGROY5qX2UKSeOvuP4D6TPqKF1onSzH9bx9XUf2lEdWT/ia1NEKjunUqu1xOB/StKDHMoX4/OKyIzuS0q/T1zOATthvasJFoPrAjkohTyaDUz2LN5JoH839hViyEG82yB+MjcFV5MU3N1l1QL3cVUCh93xSaua1N85qivl+siMkPGbO5xR/En4iEY6K2XPASUEMaieWVNTRCtJ4S8H+9" - `result.data.host.line` (string) The host's entry in the 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. Example: "host.example.com ssh-rsa AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - `result.data.host.meta` (object) An object containing metadata about the host's public key. - `result.data.host.meta.algorithm` (string) The key's algorithm. Example: "ssh-rsa" - `result.data.host.meta.body` (string) The host's public key. Example: "EEEEB3NzaC1yc2EAAAADAQABAAABAQCsj2bNKTBSpIYDEGk9KxsGh3mySTRgMtXL583qmBpzeQ+jqCMRgBqB98u3z++J1sKlXHWfM9dyhSevkMwSbhoR8XIq/U0tCNyokEi/ueaBMCvbcTHhO7FcwzY92WK4Yt0aGROY5qX2UKSeOvuP4D6TPqKF1onrSzH9\\bx9XUf2lEdWT/ia1NEKjunUqu1xOB/StKDHMoX4/OKyIzuS0q/T1zOATthvasJFoPrAjkohTyaDUz2LN5JoH839hViyEG82yB+MjcFV5MU3N1l1QL3cVUCh93xSaua1N85qivl+siMkPGbO5xR/En4iEY6K2XPASUEMaieWVNTRCtJ4S8H+9" - `result.data.host.meta.md5` (string) The key's MD5 fingerprint. Example: "b6030e39868ed0e724cea3773e014219" - `result.data.host.meta.md5-printable` (string) A human-readable version of the key's MD5 fingerprint. Example: "MD5:b6:03:0e:39:97:2e:d0:e7:24:ab:c3:77:3d:01:42:09" - `result.data.host.meta.sha256` (string) The key's SHA-256 fingerprint. Example: "55a405bcf4e11ab5b846e58ba0bf6dabd23dcc9e367cae17cb0c91b5b3b3fc55" - `result.data.host.meta.sha256-printable` (string) human-readable version of the key's SHA-256 fingerprint. Example: "SHA256:RPLFvPThGrW4RuWLoL9tq9I9zJ42fK3XywyRtbOz/EQ" - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.status` (integer) * Success. * Failed. Check the field for more details. Enum: 0, 1 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.