Managing your cloud resources with OpenStack: Difference between revisions

Jump to navigation Jump to search
Line 226: Line 226:
[[File:VM multi user cloud init.png|400px|thumb| Cloud init to add multiple users (Click for larger image)]]
[[File:VM multi user cloud init.png|400px|thumb| Cloud init to add multiple users (Click for larger image)]]


There are a number of ways to approach this, but basically what is needed is to add another public ssh key to the VM (see [[ssh keys]] about working with and creating keys). This could be done by adding to the <code>authorized_keys</code> of the primary user account provided for the VM, usually named after the operating system, or it could be added to a newly created user account. In Ubuntu, when logged in with the primary user's account this can be accomplished with the command {{Command|sudo adduser USERNAME}}. Then add the supplied public key to that users <code>.ssh/authorized_keys</code> file as described in [[ssh keys]] and linked pages.
There are a number of ways to approach this, but basically what is needed is to add another public ssh key to the VM (see [[ssh keys]] about working with and creating keys). This could be done by adding to the <code>authorized_keys</code> of the primary user account provided for the VM, usually named after the operating system, or it could be added to a newly created user account. In Ubuntu, when logged in with the primary user's account this can be accomplished with the command {{Command|sudo adduser USERNAME}}
Then add the supplied public key to that user's <code>.ssh/authorized_keys</code> file as described in [[ssh keys]] and linked pages.


Another alternative would be to do this during the creation of your VM using [http://cloudinit.readthedocs.org/en/latest/index.html# CloudInit]. The following CloudInit script (which uses the YAML format, see [http://www.yaml.org/spec/1.2/spec.html#Preview YAML Preview]):
Another alternative would be to do this during the creation of your VM using [http://cloudinit.readthedocs.org/en/latest/index.html# CloudInit]. The following CloudInit script (which uses the YAML format, see [http://www.yaml.org/spec/1.2/spec.html#Preview YAML Preview]):
Line 260: Line 261:


Once this is done, users can log into the VM with their private keys as usual (see [[ssh keys]]).
Once this is done, users can log into the VM with their private keys as usual (see [[ssh keys]]).


=Downloading an image into a local VirtualBox=
=Downloading an image into a local VirtualBox=
cc_staff
1,486

edits

Navigation menu