summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-04 14:00:07 +0200
committerGitHub <noreply@github.com>2024-07-04 14:00:07 +0200
commitea4fb0c816cdaa2087e5c497293863dcbec6d5ec (patch)
tree8bbc0dfeeabeed7e8d745accc9b3473c10ef00bd /smoketest/scripts/cli
parente76b2ae30d08c91bdd595798fb037ce692781ca7 (diff)
parent6f67cf62d20ced7c72ca6a856ce66d1e3396e79e (diff)
downloadvyos-1x-ea4fb0c816cdaa2087e5c497293863dcbec6d5ec.tar.gz
vyos-1x-ea4fb0c816cdaa2087e5c497293863dcbec6d5ec.zip
Merge pull request #3759 from vyos/mergify/bp/sagitta/pr-3721
ssh: T5878: Allow changing the PubkeyAcceptedAlgorithms option (backport #3721)
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_service_ssh.py16
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)