---
title: "Validate host"
method: GET
path: "/KnownHosts/verify"
tags: ["KnownHosts", "Known SSH Hosts Management"]
---

# Validate host

`GET /KnownHosts/verify`

This function checks whether a host's public key exists in the cPanel account's `/home/user/.ssh/known_hosts` file.

## Query parameters

- `host_name` union, required
  - string, ipv4
  - string, domain
- `port` integer

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object
      - `errors` string[] — An array of errors that the system generated.
      - `failure_type` 'new' | 'changed' — The reason why the system will register the hostname. * `new` — The host does **not** already exist. * `changed` — The host's information has changed.
      - `host` object[] — An array of objects that contain information about the host.
        - `host` union — The hostname or IP address.
          - string, ipv4
          - string, domain
        - `key` string — The host's key.
        - `line` string — The host's entry in the `/home/user/.ssh/known_hosts` file, where `user` is the cPanel account username.
        - `meta` object — An object that contains information about the host's public key.
          - `algorithm` string — The key's algorithm.
          - `body` string — The host's public key. public key.
          - `md5` string — The key's [MD5](https://en.wikipedia.org/wiki/MD5) fingerprint.
          - `md5-printable` string — A human-readable version of the key's MD5 fingerprint.
          - `sha256` string — The key's [SHA-256](https://en.wikipedia.org/wiki/SHA-2) fingerprint.
          - `sha256-printable` string — A human-readable version of the key's SHA-256 fingerprint.
      - `status` 0 | 1 — 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.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
    - `status` 0 | 1 — * `1` — Success. * `0` — Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/revisions/632e2f8e6d04/schema)
