ON can't deploy or monitor a host after the SSH key of the sunstone node was changed

So, I changed the SSH key generated by ON to one that has a passphrase and added it through ssh-add. Sunstone can ssh to node without any password, but I keep getting these errors while trying to deploy:

Thu Aug 16 19:57:43 2018 [Z0][TM][E]: Error creating directory /var/lib/one/datastores/100/2 at hypervisor: Permission denied (publickey).
Thu Aug 16 19:57:43 2018 [Z0][TM][E]: Error executing image transfer script: Error creating directory /var/lib/one/datastores/100/2 at hypervisor: Permission denied (publickey).

Error from oned.log regarding the error in monitoring:

Thu Aug 16 20:29:39 2018 [Z0][InM][I]: Command execution failed (exit code: 255): ‘if [ -x “/var/tmp/one/im/run_probes” ]; then /var/tmp/one/im/run_probes kvm /var/lib/one//datastores 4124 60 0 hypervisor; else exit 42; fi’

Thu Aug 16 20:29:43 2018 [Z0][InM][I]: Permission denied (publickey).

Thu Aug 16 20:29:43 2018 [Z0][ONE][E]: Error monitoring Host (0): -

Have you changed the one_auth files and Oneadmin password in the database?

No, I haven’t.

I did it during the initial install, but not after that.

OpenNebula does not use ssh agent so the key must be without a password. You can connect because you’ve added the key to your ssh agent. Run ssh-add -L in terminal at your workstantion/laptop and if it show the opennebula’s public key that is the case.

Hope this helps.

Best Regards,
Anton Todorov

2 Likes