hostkeys scan

Scan a host for its host keys and add them to torero

Synopsis

Scan

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 torero's known_hosts file. torero's known_hosts file exists within the app working directory whose location is set by the configuration variable TORERO_APPLICATION_WORKING_DIR.

torero hostkeys scan <host_or_list_of_hosts> [flags]

Examples

Scan A Host

Scans the host 10.0.0.1 for its host keys and add them to torero's known_hosts file.

>_ torero hostkeys scan 10.0.0.1

Scan A Host And Replace Fingerprint Mismatches

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

>_ torero 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 add them to torero's known_hosts file.

>_ torero 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

SEE ALSO