Update common.py

pull/431/head
midoks 2 years ago
parent 3addb46708
commit d9f99e6b7c
  1. 4
      class/core/common.py

@ -66,9 +66,9 @@ def initDB():
def initDBSshPort():
# SSH端口必须放开
import firewall_api
ssh_port = mw.execShell(
cmd_data = mw.execShell(
"cat /etc/ssh/sshd_config | grep 'Port \d*' | tail -1")
ssh_port = ssh_port.replace("Port ", '')
ssh_port = cmd_data[0].replace("Port ", '')
if ssh_port == '':
firewall_api.firewall_api().addAcceptPortArgs(22, 'SSH远程管理服务', 'port')

Loading…
Cancel
Save