Add optional console password (chpasswd) to cloud-init and deploy docs

This commit is contained in:
2026-04-19 13:10:12 +02:00
parent fb9629db2b
commit d091b6b50f
2 changed files with 38 additions and 0 deletions
+26
View File
@@ -63,6 +63,32 @@ openstack server create \
The VM boots with Docker installed, firewall configured (or skipped on OpenStack), and your SSH key authorized. Log in as the `devbox` user. The VM boots with Docker installed, firewall configured (or skipped on OpenStack), and your SSH key authorized. Log in as the `devbox` user.
### Console password (optional)
The cloud-init template uses SSH key authentication only — no password is set by default. This is sufficient for normal use since the `devbox` user has passwordless `sudo`.
A password is only needed for:
- **Emergency console access** — logging in via OpenStack Horizon console (noVNC) or Proxmox VNC when SSH is unreachable
- **`su - devbox`** — switching to the devbox user from another account
To enable console access, uncomment the `chpasswd` block in `cloud-init.yml` before deploying:
```yaml
chpasswd:
expire: false
users:
- name: devbox
password: your-password-here
type: text
```
For an already-running VM, set a password via SSH:
```bash
sudo passwd devbox
```
### Option 2: Post-install script (manual) ### Option 2: Post-install script (manual)
On a fresh Debian/Ubuntu VM: On a fresh Debian/Ubuntu VM:
+12
View File
@@ -23,6 +23,18 @@ users:
# CUSTOMIZE: replace with your public SSH key # CUSTOMIZE: replace with your public SSH key
- ssh-ed25519 AAAA... your-key-here - ssh-ed25519 AAAA... your-key-here
# ── Optional: console password ───────────────────────────────────────
# Uncomment to set a password for the devbox user. Only needed for
# emergency access via the OpenStack/Proxmox console (VNC/noVNC).
# SSH key authentication is used for normal access.
#
# chpasswd:
# expire: false
# users:
# - name: devbox
# password: your-password-here
# type: text
# ── Locale and timezone ────────────────────────────────────────────── # ── Locale and timezone ──────────────────────────────────────────────
locale: en_US.UTF-8 locale: en_US.UTF-8
timezone: Europe/Stockholm timezone: Europe/Stockholm