summaryrefslogtreecommitdiff
path: root/src/conf_mode/ssh.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/ssh.py')
-rwxr-xr-xsrc/conf_mode/ssh.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/conf_mode/ssh.py b/src/conf_mode/ssh.py
index 5a0ae059b..43fa2ff39 100755
--- a/src/conf_mode/ssh.py
+++ b/src/conf_mode/ssh.py
@@ -31,7 +31,7 @@ config_file = r'/etc/ssh/sshd_config'
systemd_override = r'/etc/systemd/system/ssh.service.d/override.conf'
default_config_data = {
- 'port' : '22',
+ 'port' : ['22'],
'log_level': 'INFO',
'password_authentication': 'yes',
'host_validation': 'yes',
@@ -137,9 +137,11 @@ def apply(ssh):
os.unlink(config_file)
if os.path.isfile(systemd_override):
os.unlink(systemd_override)
- else:
- # Reload systemd manager configuration
- call('systemctl daemon-reload')
+
+ # Reload systemd manager configuration
+ call('systemctl daemon-reload')
+
+ if ssh:
call('systemctl restart ssh.service')
return None