hostkeys add
- 12 Nov 2024
-
DarkLight
-
PDF
hostkeys add
- Updated on 12 Nov 2024
-
DarkLight
-
PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
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?