The behavior of the authorized_keys file on VMware ESXi systems needs clarification, specifically whether this file can be deleted and if it regenerates automatically after deletion.
The authorized_keys file on VMware ESXi is manually managed for securing SSH access using public/private key pairs. It is not a system-generated or automatically maintained file. When the authorized_keys file is deleted, ESXi does not automatically recreate it because its presence and content depend entirely on the user's configuration for key-based SSH authentication.
If the authorized_keys file is deleted, key-based SSH authentication will fail, and the file must be manually restored to re-enable this feature.
Manual Restoration: Manually recreate the authorized_keys file in the appropriate location (/etc/ssh/keys/<<username>>/authorized_keys).
Add Keys: Add the required public keys back into the file.
Alternatively, password-based login can be used until the public keys are re-added.
Justification: Manually restoring the file and adding the public keys re-enables the key-based SSH authentication mechanism.
For detailed steps on configuring and maintaining this feature, refer to the relevant VMware documentation, Allowing SSH access to VMware vSphere ESXi/ESX hosts with public/private key authentication.