From 28946b52d0a7278cf7b2b0b204f80929fdc971a5 Mon Sep 17 00:00:00 2001 From: Danny Date: Thu, 19 Mar 2026 15:22:51 +0100 Subject: [PATCH] Fix SSH password auth in Proxmox VM cloud-init Arch Linux cloud images disable SSH password authentication by default. Added cloud-init directives to: - Enable ssh_pwauth - Set the darkforge user password via chpasswd (plaintext, non-expiring) - Write /etc/ssh/sshd_config.d/99-darkforge.conf enabling PasswordAuthentication - Restart sshd after config is written Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/proxmox/create-vm.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/proxmox/create-vm.sh b/tests/proxmox/create-vm.sh index a19b24a..f00767b 100755 --- a/tests/proxmox/create-vm.sh +++ b/tests/proxmox/create-vm.sh @@ -126,6 +126,23 @@ mkdir -p "${SNIPPET_DIR}" cat > "${SNIPPET_DIR}/darkforge-test-init.yaml" << 'CLOUDINIT' #cloud-config + +# Enable SSH password authentication (cloud images disable it by default) +ssh_pwauth: true +chpasswd: + expire: false + users: + - name: darkforge + password: darkforge + type: text + +# Ensure sshd allows password auth +write_files: + - path: /etc/ssh/sshd_config.d/99-darkforge.conf + content: | + PasswordAuthentication yes + PermitRootLogin no + package_update: true packages: - base-devel @@ -147,6 +164,9 @@ packages: - tmux runcmd: + # Restart sshd to pick up the password auth config + - systemctl restart sshd + # Grow the partition to fill the disk - growpart /dev/sda 2 || true - resize2fs /dev/sda2 || btrfs filesystem resize max / || true