You typically generate new certificates only if you change the host name or accidentally delete the certificate. Under certain circumstances, you must force the host to generate new certificates.
About this task
To receive the full benefit of certificate checking, particularly if you intend to use encrypted remote connections externally, do not use a self signed certificate. Instead, install new certificates that are signed by a valid internal certificate authority or purchase a certificate from a trusted security authority.
- Log in to the ESXi Shell as a user with administrator privileges.
- In the directory /etc/vmware/ssl, back up any existing certificates by renaming them using the following commands.
mv rui.crt orig.rui.crt mv rui.key orig.rui.keyNote:
If you are regenerating certificates because you have deleted them, this step is unnecessary.
- Run the command /sbin/generate-certificates to generate new certificates.
- Restart the host.
Generating the certificates places them in the correct location. You can alternatively put the host into maintenance mode, install the new certificate, and then use the Direct Console User Interface (DCUI) to restart the management agents.
- Confirm that the host successfully generated new certificates by using the following command and comparing the time stamps of the new certificate files with orig.rui.crt and orig.rui.key.
What to do next
Consider replacing the self-signed certificate and key with a trusted certificate and key.