Atlantic.Net Blog

How to Create a pem For Your Existing SSL

Jason Mazzota
by Atlantic.Net (29 posts) under VPS Hosting
Verified and Tested 02/05/15


This tutorial will go over how to create a .pem file for your SSL. These .pem files are for use with SSLs and while you do not need a .pem, some processes are made easier by having them and they allow for simple copy and pasting as they are designed to be safe for ascii or rich-text documents. For this tutorial, you will need an SSL, self-signed or Certified by another source, the Intermediate and/or Root CA (if Certified), and the SSL key file. We will also be using OpenSSL.

Creating a pem for your existing SSL

Creating a .pem is very simple. If you did not generate your key file for your SSL as a .pem to begin with, you could do so by running the following type of command. You will need to know what format you created your key file in. These can also be used on any part of your SSL files if you need to do conversion.


openssl x509 –inform der –in yourSSLFile.der –out yourSSLFile.pem

P7B to PEM

openssl pkcs7 –print_certs –in yourSSLFile.p7b –out yourSSLFile.pem


openssl pkcs12 –in yourSSLFile.p12 (or .pfx) –out yourSSLFile.pem

Now if you generated your key as a RSA value, you’re in luck and don’t need to perform any conversion. The only thing you may wish to do is strip the passphrase or password out of it and for that you may see the <link Removing the password from your SSL key> page.

Your SSL (if you have it from a certified source) should come with an Intermediate and/or Root CA. You can actually download it from your certified source in the .pem format.

If your SSL file is a .crt or .cert then it’s likely you don’t have to do any conversion. You can try the below to be sure if you do not know:

openssl x509 -in yourSSL.crt -out yourSSL.pem

If this fails, your .crt or .cert file is a different format (likely a DER) and you can use the method described above in the key section to convert it to a .pem.

Now you can combine them all as a .pem file if you’d like or you can simply pick and choose which you’d like to combine. Since the formats are designed to be easy to use, there’s a few ways to combine them. You can simply create a new master .pem file and then open each of your .pem files and copy and paste them in the new master .pem file or cat them all into a single file. Keep in mind that some applications or software will want separate files for the SSL or key or even the Intermediate/Root CAs (like Apache.)

cat /path/to/SSLkey.pem /path/to/SSL.pem /path/to/Intermediate.pem /path/to/Root.pem > /path/to/master.pem

If you do choose the path to copy and paste, make sure you are grabbing everything (yes, even the —-BEGIN and ——END sections.)

Congratulations you have created a .pem file for your SSL. We hope this article assisted you with the process. Thank you for following this How-To, check back for updates or learn more about our reliable VPS hosting solutions.


Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year

Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

How to Install Apache Solr on Oracle Linux 8
How to Install Apache Cassandra on Oracle Linux 8
How to Install Yarn NPM Package Manager on Oracle Linux 8
How to Install Apache Spark on Oracle Linux 8
How to Install Docker and Docker Compose on Oracle Linux 8

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2008 Lookout Dr,

Dallas, Texas 75044

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4


London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom