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.
To import this SSL certificate by using the Chrome web browser on Ubuntu OS, perform the following steps:
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.pemcertificate exported successfullyroot@SRX# run request security pki key-pair export certificate-id SRXasCA filename /var/tmp/SRXasCA.key type pem passphrase Juniper@12345key-pair exported successfullyroot@SRX# run file list /var/tmp/ | match SRXSRXasCA.keySRXasCA.pem
Move these files to the Ubuntu machine (you can use SCP or other similar methods).
labroot@Ubuntu20:~$ ls | grep SRXSRXasCA.keySRXasCA.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 SRXSRXasCA.crtSRXasCA.keySRXasCA.pem
Move the key-pair to the /etc/ssl/private/ directory on the Ubuntu machine.
labroot@Ubuntu20:~$ sudo cp SRXasCA.key /etc/ssl/private/
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.
Now, the certificate is successfully imported.
2023-11-18 : Article Created
2026-08-20: Minor, non-technical changes made for search optimization