본문 바로가기

옥탑방주인/-D

opennebula VM ubuntu 접속 안될시 강제 password

Hi Daniel,

There are various places where you can add your public key:

in your sunstone user’s settings:
Settings --> Info tabb --> ‘Public SSH key’ box
in you VM template:
Selecet VM template -> Update --> Context tab --> Public Key (Add ssh contextualization must be ticked)

For SSH to work you must enable the networking by selecting a network in the network tab in the template wizard after you import image from the marketplace.

To set a password for the VM from the market place some more preparation is needed. For example to set the root password on VM instantiation:

Create the following text file:

#!/bin/sh

if [ -n "$ROOT_PASSWORD" ]; then
    echo "root:$ROOT_PASSWORD" | chpasswd
fi

Then upload it in the Files & Kernels. Set its name to like set-root-password.sh

Then in the VM template -> Context --> Configuration add User input with the following attributes:
Name: ROOT_PASSWORD
Type: password
Description: any description (optional?)

Then select Files (next under Configuration) and select the imported script.

In the Init scripts field type the file’s name - same as the one you set in Files & Kernels.

With the above configuration in the VM instantiation dialog There will be prompt to set the password for root. (Somewhere on the bottom of the page)

Type an password, start the VM and use it to login in the VNC console.

I hope this crash course will help.

Kind Regards,

Anton Todorov 



출처 : https://forum.opennebula.org/t/solved-how-todo-i-provide-ssh-public-key-the-correct-way/1584