OpenSSL/SSH One-Lines

Convert Public RSA Key to OpenSSH Public Key Format

# Depends on pub1key.pub form
ssh-keygen -f pub1key.pub -i
ssh-keygen -f pub1key.pub -i -m PKCS8

Extract Certificate and Private Key from PKCS12

openssl pkcs12 -legacy -in path.p12 -out newfile.crt.pem -clcerts -nokeys
openssl pkcs12 -legacy -in path.p12 -out newfile.key.pem -nocerts -nodes

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *