I have a .pem file with SSL private key and certificate chain for my web-server concatenated into a single file. The file is in following structure:
-----BEGIN PRIVATE KEY-----
...data...
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
...data...
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
...data...
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
...data...
-----END CERTIFICATE-----
What commands I use to split it to have separate files private.key
and fullchain.pem
?