hostkeys scan

Prev Next

iagctl hostkeys scan

Scan a host for its host keys and add them to your gateway

Synopsis

This command will scan a host or list of hosts for their host keys using the ssh-keyscan utility. Any keys that are found will be added to the gateway known_hosts file. The known_hosts file exists within the app working directory whose location is set by the configuration variable GATEWAY_APPLICATION_WORKING_DIR.

iagctl hostkeys scan <host_or_list_of_hosts> [flags]

Examples

Scan Host

Scans the host 10.0.0.1 for its host keys and add them to the gateway known_hosts file.

iagctl hostkeys scan 10.0.0.1

Scan Host and Replace Fingerprint Mismatches

Scans the host 10.0.0.1 for its host keys. If there are matching host/key type combinations, but a different fingerprint is found, the new host key will replace the old one. Without --replace, an error will be thrown if there is a security mismatch.

iagctl hostkeys add 10.0.0.1 ssh-rsa 123ABC --replace

Scan Multiple Hosts

Scans the hosts 10.0.0.1 and 10.0.0.2 for their host keys and adds them to the gateway known_hosts file.

iagctl hostkeys scan 10.0.0.1 10.0.0.2

Options

-h, --help     Help for scan
--replace      Replace keys with the same host/key type combination but a different fingerprint instead of returning an error for security reasons

Options Inherited from Parent Commands

--config string   Path to the configuration file
--raw             Displays the result of the command in its raw format
--verbose         Enable verbose output

CLI References

See related hostkeys commands: