The SSL protocol uses public-private key technology, which requires a paired private key and authentication certificate. To enable a client application to establish SSL connections, follow these steps:
Skip this step if the client application uses the JUNOScript Perl module described in “ Write Perl Client Applications” in the JUNOScript API Guide. As part of the Perl module installation procedure, you install a prerequisites package that includes the necessary SSL software.
The command writes the certificate and an unencrypted 1024-bit RSA private key to the certificate-file.pem file. The command appears here on two lines only for legibility:
- % openssl req -x509 -nodes -newkey rsa:1024 \
-
-keyout
certificate-file
.pem -out
certificate-file
.pem
- [edit]
- user@host# edit security certificates local certificate-name
- [edit security certificates local certificate-name ]
- user@host# set load-key-file URL-or-path?
![]() |
Note: The CLI expects the private key in the specified file ( URL-or-path ) to be unencrypted. If the key is encrypted, the CLI prompts for the passphrase associated with it, decrypts it, and stores the unencrypted version. |
- [edit security certificates local certificate-name ]
- user@host# top
- [edit]
- user@host# edit system services
- [edit system services]
- user@host# set xnm-ssl local-certificate certificate-name
- [edit system services]
- user@host# top
- [edit]
- user@host# show interfaces lo0
- unit 0 {
-
- family inet {
- address 127.0.0.1/32;
- }
- }
If necessary, issue the following command to add the address at the [edit interfaces lo0 unit 0 family inet] hierarchy level:
- [edit]
- user@host# set interfaces lo0 unit 0 family
inet address 127.0.0.1
- [edit]
- user@host# commit