how to enable ssh via public key authentication on vmware esxi 5

this assumes that ssh has already been enabled on the esxi host, but you’re tired of typing passwords…

simply add the public key to /etc/ssh/keys-root/authorized_keys . the file is initially empty. so, the steps are:

scp ~/.ssh/keyname.pub esxhost:/tmp
ssh esxhost
cat /tmp/keyname.pub >> /etc/ssh/keys-root/authorized_keys
rm /tmp/keyname.pub

while still logged in, and from another terminal, ssh to the host to verify that it works.