provision.pl - removed password login
This commit is contained in:
parent
8d93df3368
commit
983bb3b55e
@ -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");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user