iagctl hostkeys add

Add a host key to the gateway.

The iagctl hostkeys add command adds a host key to the gateway known_hosts file. The known_hosts file is located in the application working directory set by the GATEWAY_APPLICATION_WORKING_DIR configuration variable.

Syntax

iagctl hostkeys add <host> <key-type> <fingerprint> [flags]

Examples

Add a host key

The following example adds an ssh-rsa host key for 10.0.0.1 with a fingerprint of ABC123:

iagctl hostkeys add 10.0.0.1 ssh-rsa ABC123

Replace a mismatched fingerprint

If a host/key type combination already exists but has a different fingerprint, use --replace to update the key. Without --replace, the command returns an error for the mismatch:

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

Options

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

Options inherited from parent commands

--profile string Specify the client profile to use (case-insensitive, defaults to [client] section)
--config string Path to the configuration file
--raw Display the result of the command in raw format
--verbose Enable verbose output