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.
- 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.