hostkeys add
  • 29 Oct 2024
  • Dark
    Light
  • PDF

hostkeys add

  • Dark
    Light
  • PDF

Article summary

iagctl hostkeys add

Add a host key to gateway

Synopsis

This command will add a host key 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 add <host> <key type> <fingerprint> [flags]

Examples

Manually Add a Host Key

Adds a host key to the known host file for the host 10.0.0.1, a key encryption type of ssh-rsa, and a fingerprint of ABC123.

iagctl hostkeys add 10.0.0.1 ssh-rsa ABC123

Manually Add a Host Key with Replace Flag

Adds an ssh-rsa host key for 10.0.0.1, and a key encryption type of ssh-rsa to gateway. Replace a host key with the same host/key type but a different fingerprint if one exists. Without --replace, an error will be thrown if there is a security 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 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:

For all CLI commands see → Command References Index


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.