On top of the previous two posts, here’s how to enable password-free access to ESXi (tested with ESXi 5.1).
This is slightly different from an UNIX/Linux server in the sense that the public key has to be stored under /etc/ssh/root-keys
directory.
A nifty one-liner exists to achieve the above directly from your local computer (on my Mac):
# cat /Users/<userID>/.ssh/id_rsa.pub | ssh root@<esxi_host> 'cat >> /etc/ssh/keys-root/authorized_keys'
A password, of course, will be asked but this will be the last time. And, yeah, this setting will be reboot-resistant.
Source:
http://blogs.vmware.com/vsphere/2012/07/enabling-password-free-ssh-access-on-esxi-50.html
NOTE: please, pay attention to any security concerns about enabling SSH access in the first place.