【发布时间】:2020-12-17 03:32:45
【问题描述】:
根据 ssh-keygen 的手册 , -k 标志生成一些 KRL 文件。这些 KRL 文件是什么意思?我如何在使用此标志时指定 KRL 位置?
【问题讨论】:
标签: openssh
根据 ssh-keygen 的手册 , -k 标志生成一些 KRL 文件。这些 KRL 文件是什么意思?我如何在使用此标志时指定 KRL 位置?
【问题讨论】:
标签: openssh
根据 FreeBSD 手册页 BSD General Commands Manual:
关键撤销列表 ssh-keygen 能够管理 OpenSSH 格式的密钥撤销列表 (KRL)。 这些二进制文件指定要撤销的密钥或证书,使用 紧凑的格式,每个证书只需一位 被序列号撤销。
可以使用 -k 标志生成 KRL。此选项读取一个或多个 从命令行生成文件并生成新的 KRL。这些文件可能会 其他包含 KRL 规范(见下文)或公钥,列出一个 每行。普通公钥通过列出其散列或配置来撤销 KRL 中的帐篷和通过序列号或密钥 ID 吊销的证书(如果 序列号为零或不可用)。
使用 KRL 规范撤销密钥提供了对密钥的显式控制 用于撤销密钥的记录类型,可用于直接撤销 通过序列号或密钥 ID 的证书,而无需完整的原始 手头上的最终证书。 KRL 规范由包含以下内容的行组成: 荷兰国际集团以下指令之一,后跟一个冒号和一些指令 特定的信息。
serial: serial_number[-serial_number]
Revokes a certificate with the specified serial number. Serial
numbers are 64-bit values, not including zero and may be ex-
pressed in decimal, hex or octal. If two serial numbers are
specified separated by a hyphen, then the range of serial numbers
including and between each is revoked. The CA key must have been
specified on the ssh-keygen command line using the -s option.
id: key_id
Revokes a certificate with the specified key ID string. The CA
key must have been specified on the ssh-keygen command line using
the -s option.
key: public_key
Revokes the specified key. If a certificate is listed, then it
is revoked as a plain public key.
sha1: public_key
Revokes the specified key by its SHA1 hash.
KRLs may be updated using the -u flag in addition to -k. When this op-
tion is specified, keys listed via the command line are merged into the
KRL, adding to those already there.
It is also possible, given a KRL, to test whether it revokes a particular
key (or keys). The -Q flag will query an existing KRL, testing each key
specified on the command line. If any key listed on the command line has
been revoked (or an error encountered) then ssh-keygen will exit with a
non-zero exit status. A zero exit status will only be returned if no key
was revoked.
【讨论】: