mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
Update common.py
This commit is contained in:
@@ -68,7 +68,7 @@ def initDBSshPort():
|
||||
import firewall_api
|
||||
cmd_data = mw.execShell(
|
||||
"cat /etc/ssh/sshd_config | grep 'Port \d*' | tail -1")
|
||||
ssh_port = cmd_data[0].replace("Port ", '')
|
||||
ssh_port = cmd_data[0].replace("Port ", '').strip()
|
||||
if ssh_port == '':
|
||||
firewall_api.firewall_api().addAcceptPortArgs(22, 'SSH远程管理服务', 'port')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user