If you want to enable OpenSSH Public Key Authentication on your ESXi 5 host, append contents of your public key to
/etc/ssh/keys-USERNAME/authorized_keys
file instead of usual ~/.ssh/authorized_keys
file.For example, to enable public key logins as
root
user, do the following:cat ~/.ssh/id_rsa.pub | ssh root@esxi.machine.com 'cat >> /etc/ssh/keys-root/authorized_keys'
Obviously, SSH server needs to be enabled on the ESXi host before you can do that. As I mentioned in my ESXi 5 installation write up, starting with