diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-07-02 16:13:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-02 16:13:53 +0200 |
commit | 0bd50e7ba9bee727346fd6c6c763f9a2b26ee5aa (patch) | |
tree | 80d8eaf38f7b34df24daa33f975fd6cc83e077c2 /smoketest | |
parent | b1d74fe8e21e2a9725eefb517e7da63f8cd952f9 (diff) | |
parent | 06e6e011cdf12e8d10cf1f6d4d848fd5db51720d (diff) | |
download | vyos-1x-0bd50e7ba9bee727346fd6c6c763f9a2b26ee5aa.tar.gz vyos-1x-0bd50e7ba9bee727346fd6c6c763f9a2b26ee5aa.zip |
Merge pull request #3721 from HollyGurza/T5878
ssh: T5878: Allow changing the PubkeyAcceptedAlgorithms option
Diffstat (limited to 'smoketest')
-rwxr-xr-x | smoketest/scripts/cli/test_service_ssh.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_ssh.py b/smoketest/scripts/cli/test_service_ssh.py index b09990c92..d8e325eee 100755 --- a/smoketest/scripts/cli/test_service_ssh.py +++ b/smoketest/scripts/cli/test_service_ssh.py @@ -304,6 +304,22 @@ class TestServiceSSH(VyOSUnitTestSHIM.TestCase): for line in ssh_lines: self.assertIn(line, tmp_sshd_conf) + def test_ssh_pubkey_accepted_algorithm(self): + algs = ['ssh-ed25519', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', + 'ecdsa-sha2-nistp521', 'ssh-dss', 'ssh-rsa', 'rsa-sha2-256', + 'rsa-sha2-512' + ] + + expected = 'PubkeyAcceptedAlgorithms ' + for alg in algs: + self.cli_set(base_path + ['pubkey-accepted-algorithm', alg]) + expected = f'{expected}{alg},' + expected = expected[:-1] + + self.cli_commit() + tmp_sshd_conf = read_file(SSHD_CONF) + self.assertIn(expected, tmp_sshd_conf) + if __name__ == '__main__': unittest.main(verbosity=2) |