Has anybody figured out a way to use the SSH plugin to send commands to ESXi hosts without changing the SSH configuration file on the host to allow PasswordAuthentication?
PasswordAuthentication yes
Thanks,
Magnus
I believe that there is no other way since this is a security setting.
The only other way is to use public/private keys, but you need to add the public key part to the esxi host in the authorized_keys file.
Yeah, what I have is a chicken and the egg problem. I can't script pushing out the public key without that setting being on but i can't connect without having my public key on the host...
I was hoping someone had figured out some clever workaround..
Looks like i can use plink.exe to run 'sed' on the host to reconfigure SSH to allow password authentication.
Not ideal, but it will work.
Have you checked if you can enable password authentication from the vCenter UI ? If you can there is likely an API call that does it.
Christophe.
I have not found anything in the VI client, I looked through the advanced settings as well but nothing stood out.
I'm guessing that since it uses the standard /etc/ssh/sshd_config file that it is not something that is managed by the API. Plus, it is probably against the hardening guide as well.