openssl pkey -in key.pem -text -noout

Category: Security & Hardening

openssl pkey -in key.pem -text -noout

Inspect a private key's parameters

Prints the algorithm and parameters of the private key in key.pem, useful to confirm its type and size before use. The output includes the private key material, so keep the terminal private. To show only the public part, use openssl pkey -in key.pem -pubout.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.