-
Notifications
You must be signed in to change notification settings - Fork 696
Description
Description
Currently we still create the user, even when running in plain mode.
We don't have to do this, we can add the ssh key to the default user?
More similar to the old "vagrant" user
But either "ubuntu"* or maybe "lima"
The key would move from current "users.ssh-authorized-keys" (sic) to the root.
Since we are not mirroring users, we don't need to add ~/.ssh
but only _config
The "lima" user would still be created (like before), but not mirror host information.
users:
- name: "lima"
uid: "1000"
gecos: "Lima"
homedir: "/home/lima.linux"
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
lock_passwd: true
ssh-authorized-keys:
* that is: whatever is in cloud.cfg in the image that is currently being used
# A set of users which may be applied and/or used by various modules
# when a 'default' entry is found it will reference the 'default_user'
# from the distro configuration specified below
users:
- default
# System and/or distro specific settings
# (not accessible to handlers/transforms)
system_info:
# This will affect which distro class gets used
distro: ubuntu
# Default user name + that default users groups (if added/used)
default_user:
name: ubuntu
lock_passwd: True
gecos: Ubuntu
groups: [adm, cdrom, dip, lxd, sudo]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
https://cloudinit.readthedocs.io/en/latest/explanation/configuration.html
The user name probably needs reporting back, similar to SSH Local Port
It is needed to connect, just like the ssh host keys for strict host key checking: