ssh: Option for disabling password authentication

Closes: #572

[sunil: Reload instead of restart, fix i18n strings]
[sunil: Load augeas minimally, minor cosmetic fixes]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Nektarios Katakis authored and Sunil Mohan Adapa committed 2019-10-29 14:50:46 -07:00
1 parent caa336babc
commit ddb95752a8
4 files changed
+117 -1

No files matched your search

+6
View File
@@ -105,3 +105,9 @@ def get_host_keys():
host_keys.append(match.groupdict())
return host_keys
def is_password_authentication_disabled():
"""Return if ssh password authentication is enabled."""
return actions.superuser_run('ssh',
['get-password-config']).strip() == 'no'