the os in vm must accept root ssh login from a key (configured in sshd config)
As for your questions:
b/ the ssh key is moved from the sunstone user starting the VM by a script from the contextualization package into the root user ssh authorized keys.
c/ AFAIK the ssh key from any sunstone user is only put into the root ssh authorized keys. So any user can start the VM fro sunstone, but he/she only can ssh to rot user
Hi there, I am working with floprod and we are still having problems:
We are using images coming from templates from the marketplace that are already contextualized.
The ssh public key is correctly copied to the vm in /root/.ssh/authorized keys, I can check it if I use a context var PASSWORD and accesing as root.
I’m guessing that maybe the problem is with the default configuration sshd config. For example at Ubuntu16 marketplace image PermitRootLogin is password-porhibited but when I try log ssh to the Debian 8 and Debian 9 of the templates from the marketplace i’m asked for a password.
Or maybe is about the permissions of the vm /root/.ssh/ folrder and files within
this moning i have been checking Ubuntu 16.04, and i do not have any problem…
Here are a couple of things:
remember to ensure that your keys have defaults names if u do not want to provide extra options to ssh (i think id_* are default ones)
default sshd config has these two variables: PermitRootLogin and PasswordAuthentication. If u want to log in using password u should change that (use VNC if u cannot enter).
passwordless ssh sessions check by default: /home/[youruser]>/.ssh/authorized_keys, make sure that this folder exists in the user that u are trying to log in. Opennebula copies the key provided by sunstone/template there ALSO u need to have the right permissions.
If u are trying to log with a non-root user one way to perform this is using TEMPLATE/CONTEXT with a variable named USERNAME=“xxx” this will create automatically your user with a home folder.
i cant use right now your version (im in 5.4.0) but u can check the issue manually and see whats happens.
if after that you continue facing issues… im afraid that im not able to help you with only these info, use ssh -vvv and copy the log here. Anyways permision denied problems usually are related to keys/permissions setup.