2

esxi 8.0, Ubuntu 20.04(focal). I've created cidata.ico with hdiutil makehybrid -o cidata.iso cidata -iso -joliet

user-data content:

#cloud-config
users:
  - name: demo
    groups: sudo
    shell: /bin/bash
    sudo: ALL=(ALL) NOPASSWD:ALL
    ssh-authorized-keys:
      - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACA... 

getting

[    5.671765] cloud-init[680]: 2022-11-02 01:06:00,248 - schema.py[WARNING]: Invalid cloud-config provided: Please run 'sudo cloud-init schema --system' to see the schema errors.

Any way so I can see more details about this error? thanks!

Johny
  • 23

1 Answers1

0
root@me:~# cloud-init schema --system
Cloud config schema deprecations: 
Error:
Cloud config schema errors: users.0: {'groups': 'sudo', 'name': 'demo', 'shell': '/bin/bash', 'ssh-authorized-keys': ['ssh-rsa AAAAB3NzaC1yc2EA'], 'sudo': 'ALL=(ALL) NOPASSWD:ALL'} is not valid under any of the given schemas

If you look at the cloud-init docs, you'll see that ssh-authorized-keys is not a valid key. It has been deprecated and replaced with ssh_authorized_keys.

falcojr
  • 304
  • 1
  • 4
  • Thanks for your reply! That helped! – Johny Nov 02 '22 at 21:52
  • Im trying to ssh to the host: ssh demo@192.168.50.159

    getting: demo@192.168.50.159: Permission denied (publickey).

    Any ideas why? thanks and appreciate it.

    – Johny Nov 02 '22 at 21:52