當使用者憑證存在時,Windows 上的 OpenSSH 不會新增私鑰

當使用者憑證存在時,Windows 上的 OpenSSH 不會新增私鑰

ssh-agent我在 Windows 上使用 OpenSSH添加帶有使用者憑證的私鑰時遇到問題。當我嘗試新增金鑰ssh-add testkey並且還有一個可用於該金鑰的使用者憑證(如 )時testkey-cert.pub,僅將憑證新增至ssh-agent.

重現步驟:

  1. 建立新的 RSA 金鑰對ssh-keygen -f testkey
  2. 建立 CA 金鑰對用於簽署測試金鑰ssh-keygen -f ca
  3. 簽署測試金鑰ssh-keygen -s ca -I testkey testkey.pub
  4. 將測試金鑰新增至 SSH 代理ssh-add testkey
  5. 列出新增的按鍵以檢查結果ssh-add -l

RSA-CERT新增到代理中。

PS C:> ssh-add testkey
Identity added: testkey (testkey)
Certificate added: testkey-cert.pub (testkey)

PS C:> ssh-add -l
2048 SHA256:vaqqEObTRX5icClKdRsEvyut5G1ug9C8uBjJ1TrCx9w testkey (RSA-CERT)

當我在 Linux 上執行這些步驟時,RSA 金鑰證書都已新增

$ ssh-add test
Identity added: test (test)
Certificate added: test-cert.pub (id_rsa)

$ ssh-add -l
2048 SHA256:3bhXQ3lSdSejjvecm2XtMBa46XiyqFaC70pLibgILMo test (RSA)
2048 SHA256:3bhXQ3lSdSejjvecm2XtMBa46XiyqFaC70pLibgILMo test (RSA-CERT)

這是 Windows 版 OpenSSH 用戶端的問題嗎?

感謝你並致以真誠的問候

答案1

做一些死靈術:我偶然發現了同樣的問題。

我的解決方案:將憑證移出資料夾 ssh-add private_key 將憑證移回 .ssh

相關內容