Description

This article describes how to import a self-signed certificate that was created on an SRX device by using the Chrome web browser on Ubuntu OS when the SSL certificate is not working on MAC & Ubuntu OS.

Refer to KB21718 - [Junos] How to create a custom self-signed certificate for web-management using HTTPS [juniper.net] for more information on creating custom self-signed certificates on SRX devices. 

Solution

To import this SSL certificate by using the Chrome web browser on Ubuntu OS, perform the following steps: 

  1. Export the certificate from the SRX device in .pem format and the key pair. 

root@SRX# run request security pki local-certificate export certificate-id SRXasCA filename /var/tmp/SRXasCA.pem
certificate exported successfully

root@SRX# run request security pki key-pair export certificate-id SRXasCA filename /var/tmp/SRXasCA.key type pem passphrase Juniper@12345
key-pair exported successfully

root@SRX# run file list /var/tmp/ | match SRX
SRXasCA.key
SRXasCA.pem
  1. Move these files to the Ubuntu machine (you can use SCP or other similar methods).

labroot@Ubuntu20:~$ ls | grep SRX
SRXasCA.key
SRXasCA.pem

The Chrome browser on Ubuntu OS needs a .crt file; therefore, make a copy of the certificate in .crt format.

labroot@Ubuntu20:~$sudo cp SRXasCA.pem SRXasCA.crt

Now you should see the below files: 

labroot@Ubuntu20:~$ ls | grep SRX
SRXasCA.crt
SRXasCA.key
SRXasCA.pem
  1. Move the key-pair to the /etc/ssl/private/ directory on the Ubuntu machine.

labroot@Ubuntu20:~$ sudo cp SRXasCA.key /etc/ssl/private/
  1. Import the .crt certificate on the Chrome browser. 

Navigate to Settings > Certificates > Manage certificates > Authorities >Import.

Select “Trust this certificate for identifying websites”, and then click OK.

Pasted Graphic 4.png

Now, the certificate is successfully imported. 

Modification History

2023-11-18 : Article Created

2026-08-20: Minor,  non-technical changes made for search optimization