Extract public/private key from PKCS12 file for later use in SSH-PK-Authentication

The Solution to Extract public/private key from PKCS12 file for later use in SSH-PK-Authentication is


You can use following commands to extract public/private key from a PKCS#12 container:

  • PKCS#1 Private key

    openssl pkcs12 -in yourP12File.pfx -nocerts -out privateKey.pem
    
  • Certificates:

    openssl pkcs12 -in yourP12File.pfx -clcerts -nokeys -out publicCert.pem
    

~ Answered on 2012-03-01 13:19:04


Most Viewed Questions: