
Procedure
1. Log on to the SMW as root.
All of the remaining steps will be performed from within the root user's home directory to ensure the created
files are not accessible to anyone except the root user.
2. Switch to the user's home directory.
#
cd ~
3. Generate a private key file.
#
openssl genrsa -out keyfile.key 2048
4. Generate certificate request file.
#
openssl req -new -key keyfile.key -out certrequest.csr
Press the Enter key for all the prompts, but enter
hostname
-smw
for Common Name.
In the example, notice that
core-013.domain.local
has been used, which means that this is the address
to use when the Nagios Core server is accessed via the web browser, otherwise the system will return
warnings in the web browser.
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:AU
State or Province Name (full name) []:NSW
Locality Name (eg, city) [Default City]:Sydney
Organization Name (eg, company) [Default Company Ltd]:My Company Pty Ltd
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:core-013.domain.local
Email Address []:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
As it can been see above, a password was not supplied as it is not necessary.
5. Sign the certificate request.
At this point, the newly created certificate request needs to be signed by a CA.
●
Use a trusted CA company
If the certificate is to be obtained from a trusted company like VeriSign, send them a copy of the certificate
request, which can be viewed by executing the following command:
cat certrequest.csr
System Monitoring
S3016
68