2021-11-02 18:09:18

This commit is contained in:
gbaconni
2021-11-02 18:09:18 +01:00
parent cb870a491e
commit 47c355ae0b

View File

@@ -526,8 +526,10 @@ d-i finish-install/reboot_in_progress note
d-i preseed/late_command \
in-target update-alternatives --set editor /usr/bin/vim.basic; \
in-target sed -i'.orig' -r 's/^#?(Port) .*/\1 4242/; s/^#?(PermitRootLogin) .*/\1 no/;' /etc/ssh/sshd_config; \
in-target ufw enable; \
in-target ufw default deny incoming; \
in-target ufw default allow outgoing; \
in-target ufw allow proto tcp from any to any port 4242 comment 'Allow SSH'; \
in-target ufw enable; \
in-target groupadd -f -r sudo; \
in-target groupadd -f user42; \
in-target usermod -a -G sudo,user42 gbaconni; \