[Bug 3838] New: Unable to import PKCS#8 keys

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Tue Jun 10 06:04:33 AEST 2025


https://bugzilla.mindrot.org/show_bug.cgi?id=3838

            Bug ID: 3838
           Summary: Unable to import PKCS#8 keys
           Product: Portable OpenSSH
           Version: 10.0p2
          Hardware: amd64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh-keygen
          Assignee: unassigned-bugs at mindrot.org
          Reporter: mazurbogd at yandex.ru

I cant import private keys generated with openssl

Genrating keys:
openssl genpkey -algorithm rsa -out rsa
openssl pkey -in rsa -pubout >rsa.pub

ssh-keygen -vm PKCS8 -if rsa
  do_convert_from_pkcs8: rsa is not a recognised public key format

But ssh-keygen -vm PKCS8 -if rsa.pub works as intended!

ssh-keygen -vm PKCS8 -lf rsa.pub
  debug1: rsa.pub:1: not a public key
  debug1: rsa.pub:9: not a public key
  rsa.pub is not a public key file.
ssh-keygen -vm PKCS8 -lf rsa
  debug1: load public "rsa": No such file or directory
  2048 SHA256:Ecyu3M6Qg/dXMe3wfoXw393yQE99ymuJhNYQO8bgCNw no comment
(RSA)


Same errors showing up with ed25519 keys, but importing pubkey isnt
working too here, maybe its related to Bug 3195

ssh-keygen -vm PKCS8 -if k.pub 
  do_convert_from_pkcs8: unsupported pubkey type 108

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list