diff options
author | Christian Breunig <christian@breunig.cc> | 2024-07-03 19:24:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-03 19:24:30 +0200 |
commit | c85e7223dbcc7973eb71c15a26a5518b883c21a9 (patch) | |
tree | ecd3548e89eb7d249c4e2e2fa47790e434749717 /smoketest/scripts/cli | |
parent | 87df09d2415ffcc77556544b31dbd33dd5b07c6d (diff) | |
parent | 503fb7fb33b8c3758a50bd5dcfbcd907d4a8719b (diff) | |
download | vyos-1x-c85e7223dbcc7973eb71c15a26a5518b883c21a9.tar.gz vyos-1x-c85e7223dbcc7973eb71c15a26a5518b883c21a9.zip |
Merge pull request #3758 from vyos/mergify/bp/circinus/pr-3721
ssh: T5878: Allow changing the PubkeyAcceptedAlgorithms option (backport #3721)
Diffstat (limited to 'smoketest/scripts/cli')
-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) |