bifroest key export host
Exports known_hosts entries for the supplied address. Locally, --identityFile selects a key to load or create; otherwise the configured host keys are loaded or created. With @target or direct SSH, the running server's active host keys are exported without creating or changing any key.
Syntax
--address labels the exported entries; it does not connect to that address. A remote invocation connects only to the management target.
Arguments
None.
Flags
Includes all general flags.
--configuration
Local configuration to load when identityFile is absent. Defaults to the platform path. Not accepted with @target or direct SSH.
--identityFile
Specific local host private-key file to load or create. This cannot be combined with configuration and is not accepted with @target or direct SSH.
--address
string
Host represented by the generated entries. Port 22 can be omitted; non-default IPv6 ports use [address]:port.
--output
File Path = "-"
Output file on the CLI machine. - writes to stdout. Direct SSH always writes to stdout and does not accept output or force.
--force
bool = false
Replaces an existing output file.
Output
OpenSSH known_hosts entries on stdout or in the requested file. Remote export returns the keys already used by the running Bifröst server; it is not a host-key discovery or unknown-key acceptance command.
Examples
Provision trusted host keys for a management workstation
-
On the Bifröst host, use its actual configuration and address:
1 2 3
bifroest key export host \ --address bifroest.example.org \ --output /srv/ssh-trust/bifroest-known-hosts -
Transfer the public entries over an independently trusted channel and import them on the workstation with
key import host.The management guide uses these entries for SSH host-key checking. See Bifröst delegation for a complete host-key bootstrap sequence.
Export active host keys over an already trusted connection
- Provision management SSH trust and configure the workstation alias as in the management guide.
-
Export the server's active public keys:
Administrator workstation 1 2 3
bifroest @bifroest-admin key export host \ --address bifroest.example.org \ --output bifroest-known-hostsThe initial management connection still needs a trusted
known_hostsentry. This command cannot bootstrap its own unknown host key. Direct SSH supportsssh management@bifroest.example.org 'key export host --address=bifroest.example.org'.
Availability
linux |
darwin |
windows |
|---|---|---|
| / | / | / |
Invocation modes
| Local CLI | @target |
Direct SSH |
|---|---|---|