From b9bf65b4a184ceae72b7f7937b46ada8a70032e7 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Sat, 20 Jul 2024 08:09:47 +0200 Subject: [PATCH] Drop ssh configuration. The default SSH configuration is Debian 12 is as follows: #PermitRootLogin prohibit-password #PermitEmptyPasswords no (The default values are commented out, ready to be tweaked by local admins.) --- raspberrypi/recipes/pi3-pi4.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/raspberrypi/recipes/pi3-pi4.sh b/raspberrypi/recipes/pi3-pi4.sh index 564c344..89d1877 100644 --- a/raspberrypi/recipes/pi3-pi4.sh +++ b/raspberrypi/recipes/pi3-pi4.sh @@ -11,10 +11,6 @@ toast_me() { chroot $MNT useradd -s /bin/bash -Gsudo -m pi chroot $MNT usermod -aG plugdev pi echo "pi:raspberry" | chroot $MNT chpasswd - # Disable root login on SSH - mkdir -p $MNT/etc/ssh/sshd_config.d/ - echo "PermitEmptyPasswords no" > $MNT/etc/ssh/sshd_config.d/pirogue-ssh.conf - echo "PermitRootLogin no" >> $MNT/etc/ssh/sshd_config.d/pirogue-ssh.conf # Force generate SSH host keys if they exist and enable SSH rm -f $MNT/etc/ssh/ssh_host_* chroot $MNT systemctl enable ssh