小编Dvi*_*nis的帖子

如何使用 SSH 签署文件并使用证书颁发机构验证它?

我想让选定数量的开发人员能够在系统上运行代码,并使用 OpenSSH 的-Y verify功能对其进行验证。

# Generate the certificates, and sign the dev cert with the root CA
ssh-keygen -t ed25519 -C "Example Root CA" -N "" -f ./rootca
ssh-keygen -t ed25519 -C "Some Developer Inc." -N "" -f ./developer
ssh-keygen -s ./rootca -I somedeveloper@example.com ./developer.pub  # <- Creates ./developer-cert.pub

# Sign "example.bin"
echo "hello" > ./example.bin
ssh-keygen -Y sign -f ./developer -n "codesign@example.com" ./example.bin
Run Code Online (Sandbox Code Playgroud)

现在,给定“example.bin”、“example.bin.sig”、“rootca.pub”和“developer-cert.pub”,您将如何验证它?

ssh-keygen -Y verify命令不带“developer-cert.pub”文件的参数,这对于完成 CA 和签名之间的信任链至关重要。

我可以使用ssh-keygen -L,但它似乎不安全(谁实际上检查证书中的根 …

linux ssh openssh cryptography digital-signature

6
推荐指数
1
解决办法
1104
查看次数

标签 统计

cryptography ×1

digital-signature ×1

linux ×1

openssh ×1

ssh ×1