0

I was trying to get a public key in Openssh format from an existing .p12 certificate. I can see little to no documentation on this.

I saw this option -i option in ssh-keygen man page. That sounds similar to what I want to achieve. i.e., change one format of key to OpenSSH format.

I tried multiple examples, but I always get format not supported error. What are possible interchangeable formats?

It would be great to get an example how -i format works.

Thanks in advance.

2
  • 1
    Stackoverflow is for help with software development. You should consider asking questions like this on Super User or Unix & Linux. When you do, you should showing exactly how you're running ssh-keygen and exactly what error you're getting. Don't paraphrase the error. It would also be helpful to show what format input file you have. Commented Aug 23, 2023 at 20:56
  • The formats are in same man page under -m: RFC4716 PKCS8 PEM. The description there has some flaws but it is correct about one thing: OpenSSH does not support PKCS12. I don't see how it would help to have examples of something that cannot achieve your goal. If you have or get OpenSSL (an entirely different thing), you could use that with ssh-keygen -y (not -i) to do what you want, but that's (now) offtopic in addition to being prohibited by your question. @Kenster: .p12 strongly implies PKCS12 format. Commented Aug 23, 2023 at 21:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.