coreos / docs

Documentation for CoreOS projects
http://coreos.com/docs
Apache License 2.0
882 stars 534 forks source link

cloud-config adding ssh authorized_keys - documentation? #1156

Open naisanza opened 6 years ago

naisanza commented 6 years ago

From the documentation on installing to disk: https://coreos.com/os/docs/latest/installing-to-disk.html

This doesn't work:

#cloud-config
passwd:
  users:
    - name: core
      ssh_authorized_keys:
        - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGdByTgSVHq...

After digging around and finding this: https://coreos.com/os/docs/latest/cloud-config.html

This works:

#cloud-config
ssh_authorized_keys:
  - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGdByTgSVHq...
bgilbert commented 6 years ago

The config on that page is a Container Linux Config, not a cloud-config. To use it, run it through the Container Linux Config Transpiler to get an Ignition config, then pass the Ignition config to coreos-install -i.

For more information on migrating from cloud-configs to Container Linux Configs, see here.

naisanza commented 6 years ago

@bgilbert ah I see. I just have to get a copy of https://github.com/coreos/container-linux-config-transpiler/releases. Is the Container Linux Config Transpiler available on the coreos ISO?

bgilbert commented 6 years ago

At present we don't include the Config Transpiler in the OS image, so you'll have to download it from the releases page.