provision.pl - removed password login

This commit is contained in:
gashapwn 2021-03-02 17:18:06 +00:00
parent 8d93df3368
commit 983bb3b55e

View File

@ -170,12 +170,15 @@ system("rcctl start haproxy");
# Disable root login # Disable root login
system("sed -i -e 's/^[^#]*PermitRootLogin.*\$/PermitRootLogin no/' /etc/ssh/sshd_config"); system("sed -i -e 's/^[^#]*PermitRootLogin.*\$/PermitRootLogin no/' /etc/ssh/sshd_config");
system("sed -i -e 's/^PasswordAuthentication.*$//' /etc/ssh/sshd_config");
system("echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config");
system("rcctl restart sshd");
printf("\n\nInstall complete\n"); printf("\n\nInstall complete\n");
printf("==================================================\n"); printf("==================================================\n");
printf("Protip: use doas instead of sudo\n"); printf("Protip: use doas instead of sudo\n");
printf("root login is now disabled, so dont forget\nto set a password\n"); printf("root login and password login is now disabled, so dont forget\nto set a password\n");
printf("and test your pub key\n"); printf("and test your pub key\n");