[rhos-list] cloud-init configuration for ssh access
David Raddatz
draddatz at sgi.com
Fri Oct 18 20:47:39 UTC 2013
OK - I've got to be really close. I created my instance (after installing cloud-init in it and configuring it for my cloud-tester user as the default and setting disable_root to 0, ran virt-sysprep on the image, uploaded it using glance and launched an instance using that image and keypair) and when I try to ssh into the instance using the keypair, I get:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
I get this for both users (root and cloud-tester). What am I missing?
Dave
> -----Original Message-----
> From: Lars Kellogg-Stedman [mailto:lars at redhat.com]
> Sent: Friday, October 18, 2013 3:18 PM
> To: David Raddatz
> Cc: rhos-list at redhat.com
> Subject: Re: cloud-init configuration for ssh access
>
> On Fri, Oct 18, 2013 at 07:57:10PM +0000, David Raddatz wrote:
> > Is there a way to comment things out? (the # sign is my guess)
>
> Yes. This file uses YAML syntax (http://en.wikipedia.org/wiki/YAML),
> which uses '#' as a comment character.
>
> You'll find lots of cloud-init documentation here:
>
> http://cloudinit.readthedocs.org/en/latest/index.html
>
> (Although note that this documents the most recent version of cloud-init,
> while the version in EPEL seems to be behind a few revs. A cursory look at
> the examples suggests that they're still
> relevant.)
>
> > Near the top it has
> > users:
> > - default
>
> > Do I need to add "- root" if I want to allow root to login as well?
> > OR, do I just change disable_root: from 1 to 0?
>
> When `disable_root` is `1`, then when you try to log into your system as root
> using your ssh key you will see this message:
>
> Please login as the user "cloud" rather than the user "root".
>
> (Where "cloud" is whatever user was provisioned by cloud-init)
>
> Having `disable_root` set to 0 basically means "do nothing to the root
> account".
>
> > Under "system_info:", there is a "default_user:" section with
> > cloud-user. I just renamed that so I wouldn't confused for when I was
> > using the rh image or my image (used cloud-tester for my image).
> > Do I need to add cloud-tester under "users:" or should I be OK since I
> > made that user the default.
>
> I believe the `- default` entry in the `users` section will cause cloud-init to set
> up the `default_user` in the `system_info` section.
> I have never actually bothered trying to modify this so consider this
> conjecture on my part.
>
> This page has example of creating additional users via cloud-init:
>
> http://cloudinit.readthedocs.org/en/latest/topics/examples.html
>
> Note that if you're building your own image, you may also want to add
> dracut-modules-growroot.noarch and rebuilding your initramfs.
> If you're using a simple partitioning scheme, this module will edit your
> partition table to expand the partition containing your root filesystem so that
> it fills the disk. This allows you (or Fedora, or
> Ubuntu) to distribute a small cloud image and then deploy it onto a much
> larger disk and be able to take advantage of the extra space.
>
> --
> Lars Kellogg-Stedman <lars at redhat.com>
More information about the rhos-list
mailing list