Update firewall.py

This commit is contained in:
dami
2025-09-10 22:00:51 +08:00
parent 8877d7ea55
commit 9dae7988fd
+1 -1
View File
@@ -230,7 +230,7 @@ class Firewall(object):
data['pubkey_prohibit_status'] = True
# root登陆配置检查
root_rep = r"PermitRootLogin\s+(\w*)\s*\n"
root_rep = r"^PermitRootLogin\s+(\w*)\s*\n"
root_status = re.search(pass_rep, conf)
if root_status:
if root_status and root_status.groups(0)[0].strip() == 'no':