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.)
This commit is contained in:
Cyril Brulebois 2024-07-20 08:09:47 +02:00
parent 7282fa4fa1
commit b9bf65b4a1

View File

@ -11,10 +11,6 @@ toast_me() {
chroot $MNT useradd -s /bin/bash -Gsudo -m pi chroot $MNT useradd -s /bin/bash -Gsudo -m pi
chroot $MNT usermod -aG plugdev pi chroot $MNT usermod -aG plugdev pi
echo "pi:raspberry" | chroot $MNT chpasswd 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 # Force generate SSH host keys if they exist and enable SSH
rm -f $MNT/etc/ssh/ssh_host_* rm -f $MNT/etc/ssh/ssh_host_*
chroot $MNT systemctl enable ssh chroot $MNT systemctl enable ssh