diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-02-17 21:21:12 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-02-17 21:21:12 +0100 |
commit | 13686def7e7370ff910abce20b744f5ded932718 (patch) | |
tree | bcdbae9ad9b42270293ccefe4f0bde4062e9ea50 /scripts/cli/test_service_ssh.py | |
parent | 0078259e5eecee5439e0ef013b64235e4db91c76 (diff) | |
download | vyos-1x-13686def7e7370ff910abce20b744f5ded932718.tar.gz vyos-1x-13686def7e7370ff910abce20b744f5ded932718.zip |
ssh: add test for disable-password-authentication
Diffstat (limited to 'scripts/cli/test_service_ssh.py')
-rwxr-xr-x | scripts/cli/test_service_ssh.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/cli/test_service_ssh.py b/scripts/cli/test_service_ssh.py index 40e1433b2..e882b8f0a 100755 --- a/scripts/cli/test_service_ssh.py +++ b/scripts/cli/test_service_ssh.py @@ -49,6 +49,7 @@ class TestServiceSSH(unittest.TestCase): """ Check if SSH service can be configured and runs """ self.session.set(base_path + ['port', '2222']) self.session.set(base_path + ['disable-host-validation']) + self.session.set(base_path + ['disable-password-authentication']) # commit changes self.session.commit() @@ -61,6 +62,10 @@ class TestServiceSSH(unittest.TestCase): dns = get_config_value('UseDNS') self.assertTrue("no" in dns) + # Check PasswordAuthentication + pwd = get_config_value('PasswordAuthentication') + self.assertTrue("no" in pwd) + # Check for running process self.assertTrue("sshd" in (p.name() for p in process_iter())) |