This article provides the procedure to regenerate the self-signed SSL certificate on standalone VMware ESXi hosts running version 7.0 or later.
Regenerating certificates may be necessary if the existing certificate is expired, corrupted, or causing connectivity issues with management tools.
Ensure you have administrative access to the ESXi host.
You can either use the Direct Console User Interface (DCUI) to enable SSH, or alternatively use the ESXi host client.
To enable SSH access via the ESXi host client, please follow these steps:
https://<esxi_ip_or_fqdn>/ui/#/host:
#/sbin/generate-certificates
#/etc/init.d/hostd restart && /etc/init.d/vpxa restart
If you manage multiple standalone ESXi hosts, repeat this procedure on each host as required.
In case the /sbin/generate-certificates is stuck check if the host has proper FQDN set. It cannot resolve a valid Fully Qualified Domain Name (FQDN) to use as the "Common Name" (CN) for the certificate. It is waiting for a network timeout or input that will never come.
If ESXi was connected using only ip then set the hostname temporarily and add it to /etc/hosts file to resolve locally and then use the above command to regenerate certificate on host.