bifroest key export public
Writes exactly one LF-terminated OpenSSH public-key line. Standard output is used by default. An existing destination file is not replaced unless --force is set.
Locally, select a private-key file. With @target or direct SSH, select a configured SSH flow: Bifröst exports its certificate subject identity, or the selected static environment.identityFiles entry. Private keys stay on the source machine; exporting never creates a missing server identity.
Syntax
Arguments
flowName
Required with @target and direct SSH; not accepted locally. The SSH-environment flow whose configured identity is exported. Certificate flows have one subject identity at index 0. Other SSH flows require an explicit, static identityFiles entry; session-dependent paths and implicit host-key fallback are not selected by this command.
Flags
Includes all general flags.
--identityFile
Private key file whose public key is exported. Required locally; not accepted with @target or direct SSH.
--identityIndex
unsigned integer = "0"
Zero-based index in the selected server flow's identityFiles. Available with @target and direct SSH. For a certificate subject identity, only 0 is accepted.
--comment
string
Optional OpenSSH public-key comment. Line breaks are not accepted.
--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. Without this flag, an existing file is never modified.
Output
One LF-terminated OpenSSH public-key line, on stdout or in the requested file. The private key is not modified or emitted.
Examples
Export a recipient's public key after generating its private key
- Generate a recipient with
key generate, or select an existing private identity. -
Export its public half on the workstation:
1 2 3
bifroest key export public \ --identityFile /srv/audit-keys/recipient-key \ --output /srv/audit-keys/recipient-key.pubChoose a new output path;
--forceis required to replace an existing public-key file. See the encrypted-evidence guide for server configuration using this public key.
Export a configured server identity
- Configure the
gatewaycertificate flow and workstation alias in Export server public keys remotely. -
Export its subject public key to the workstation:
Administrator workstation 1bifroest @bifroest-admin key export public gateway --output gateway-subject.pubFor an SSH flow using several static identity files, add
--identityIndex=1to select its second entry. The server does not accept anidentityFilepath from the client.
Availability
linux |
darwin |
windows |
|---|---|---|
| / | / | / |
Invocation modes
| Local CLI | @target |
Direct SSH |
|---|---|---|