change secure
This commit is contained in:
@@ -155,13 +155,13 @@ class WOSecureController(CementBaseController):
|
|||||||
if 'Port' in line:
|
if 'Port' in line:
|
||||||
ssh_line = line.strip()
|
ssh_line = line.strip()
|
||||||
break
|
break
|
||||||
else:
|
|
||||||
port = (ssh_line).split(' ')
|
port = (ssh_line).split(' ')
|
||||||
current_ssh_port = port[1]
|
current_ssh_port = (port[1]).strip()
|
||||||
data = dict(sshport=current_ssh_port, allowpass='no')
|
data = dict(sshport=current_ssh_port, allowpass='no')
|
||||||
WOTemplate.render(self, '/etc/ssh/sshd_config',
|
WOTemplate.render(self, '/etc/ssh/sshd_config',
|
||||||
'sshd.mustache', data)
|
'sshd.mustache', data)
|
||||||
WOService.restart_service(self, 'ssh')
|
WOService.restart_service(self, 'ssh')
|
||||||
else:
|
else:
|
||||||
Log.error(self, "SSH config file not found")
|
Log.error(self, "SSH config file not found")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user