Another fix for secure
This commit is contained in:
@@ -148,10 +148,6 @@ class WOSecureController(CementBaseController):
|
|||||||
@expose(hide=True)
|
@expose(hide=True)
|
||||||
def secure_ssh(self):
|
def secure_ssh(self):
|
||||||
"""Harden ssh security"""
|
"""Harden ssh security"""
|
||||||
pargs = self.app.pargs
|
|
||||||
if pargs.user_input:
|
|
||||||
current_ssh_port = pargs.user_input
|
|
||||||
else:
|
|
||||||
if os.path.isfile('/etc/ssh/sshd_config'):
|
if os.path.isfile('/etc/ssh/sshd_config'):
|
||||||
for line in open('/etc/ssh/sshd_config', encoding='utf-8'):
|
for line in open('/etc/ssh/sshd_config', encoding='utf-8'):
|
||||||
if 'Port' in line:
|
if 'Port' in line:
|
||||||
|
|||||||
Reference in New Issue
Block a user