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) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user