last updated for debian 12 (bookworm)
only two package groups
ssh server base
dummy passwd for root and some-admin
fix ssh setup (pubkey only)
cd /root/.ssh/ ... cd /home/some-admin/.ssh/ ... cd /etc/ssh/ ...
better no password than any dummy one (assuming physical access to console is secured)
passwd --delete root passwd --delete some-admin
and proceed
cd /etc/ cp -pi sudoers sudoers.dist vi sudoers some-admin ALL = NOPASSWD: ALL apt install bash-completion colordiff net-tools cd /etc/apt/ vi sources.list deb http://deb.debian.org/debian/ bookworm main non-free-firmware contrib non-free deb http://deb.debian.org/debian/ bookworm-updates main non-free-firmware contrib non-free deb http://deb.debian.org/debian/ bookworm-backports main non-free-firmware contrib non-free deb http://security.debian.org/debian-security bookworm-security main non-free-firmware contrib non-free
fix the timezone just in case you messed it up during install
timedatectl set-timezone Europe/Moscow
get rid of that
dpkg -l | grep prober dpkg --purge os-prober rm -f /etc/grub.d/30_os-prober
clean-up for template
history -c