Skip to content

Instantly share code, notes, and snippets.

@pzbitskiy
pzbitskiy / pve-ha-ssh.sh
Last active July 14, 2024 16:12
Enable SSH for Home Assistant PVE/QEMU virtual machine
# HA VM has dropbear SSH server but it cannot start because there is no authorized_keys
# This scripts adds $SSH_KEY via USB config import.
# All commands run as root on a Proxmox host and checked with PVE 8.2.4 and HAOS 2024.6.4
# 1. Prepare USB stick image
dd if=/dev/zero of=usb-blk.img count=50 bs=4096
losetup -f ./usb-blk.img
# losetup created /dev/loop1
parted -s /dev/loop1 mklabel msdos