debian: 修复 debian 10 sshd_config 默认配置被清空

This commit is contained in:
bin456789 2023-07-22 21:44:58 +08:00
parent 9deec238c2
commit 382feb49c7
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -65,6 +65,7 @@ d-i preseed/early_command string \
d-i partman/early_command string \
debconf-set partman-auto/disk "$(list-devices disk | head -n1)"
# debian 10 没有 /target/etc/ssh/sshd_config.d/ 文件夹
d-i preseed/late_command string \
echo "PermitRootLogin yes" >/target/etc/ssh/sshd_config.d/01-permitrootlogin.conf || \
echo "PermitRootLogin yes" >/target/etc/ssh/sshd_config
echo "PermitRootLogin yes" >>/target/etc/ssh/sshd_config