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?
id_{alg}.pub
files are ALWAYS (not just on Windows) OpenSSH format (i.e. one line); if you manually make it any other formatssh
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.