0

Windows 10 command line ssh-keygen -b 2048 -mPKCS8 doesn't change the .pub file created to PKCS8 (it's always the one-liner).

I can do this to get the actual format output to the screen: ssh-keygen -ef test.key -mPKCS8

but if I tell it to use PKCS8 when generating, it seems to ignore it?

Is this as intended or a bug or am I doing something wrong?

2
  • 1
    The id_{alg}.pub files are ALWAYS (not just on Windows) OpenSSH format (i.e. one line); if you manually make it any other format ssh won't work. -m on a generate or update command affects the privatekey file not the publickey; on export -e (only) it can format the publickey in what OpenSSH incorrectly calls PKCS8 but is in fact X.509/PKIX SPKI and NOT PKCS8. @Ramhound: actually OpenSSH 9.6 now does support PKCS8 for ed25519 privatekey, but this question (1) isn't about ed25519 and (2) isn't about privatekey. Commented Jan 10 at 4:12
  • @dave_thompson_085 - Author isn’t using that version as the built-in version of OpenSSH hasn’t yet reach the 9.x branch
    – Ramhound
    Commented Jan 10 at 12:53

0

You must log in to answer this question.

Browse other questions tagged .