From 2fa4dbe394ed7223ec4129b682291f00fd0a805c Mon Sep 17 00:00:00 2001 From: Wai Yee Wong Date: Tue, 7 Jun 2022 15:17:24 -0400 Subject: [PATCH 1/3] Check host keys supported by operating systems and report new ones --- .../autotest/testcase/install_xCAT/case0 | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index 35183600a..77246b166 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -20,6 +20,16 @@ cmd:service xcatd status check:rc==0 check:output=~running cmd:rm -rf /install_xCAT_xcat-core.tar.bz2 /install_xCAT_xcat-dep.tar.bz2 + +# Check host keys supported by the current OS. +cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys +check:rc==0 +cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys +check:rc==0 +cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys +check:output!~> +cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys +check:rc==0 end @@ -57,6 +67,16 @@ cmd:service conserver stop cmd:sleep 5 cmd:service goconserver status cmd:service conserver status + +# Check host keys supported by the current OS. +cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys +check:rc==0 +cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys +check:rc==0 +cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys +check:output!~> +cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys +check:rc==0 end From 38f83851c41d8cb0535211e4822f464f725b71c1 Mon Sep 17 00:00:00 2001 From: Wai Yee Wong Date: Tue, 7 Jun 2022 15:18:44 -0400 Subject: [PATCH 2/3] Revert "Check host keys supported by operating systems and report new ones" This reverts commit 2fa4dbe394ed7223ec4129b682291f00fd0a805c. --- .../autotest/testcase/install_xCAT/case0 | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index 77246b166..35183600a 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -20,16 +20,6 @@ cmd:service xcatd status check:rc==0 check:output=~running cmd:rm -rf /install_xCAT_xcat-core.tar.bz2 /install_xCAT_xcat-dep.tar.bz2 - -# Check host keys supported by the current OS. -cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys -check:rc==0 -cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys -check:rc==0 -cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys -check:output!~> -cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys -check:rc==0 end @@ -67,16 +57,6 @@ cmd:service conserver stop cmd:sleep 5 cmd:service goconserver status cmd:service conserver status - -# Check host keys supported by the current OS. -cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys -check:rc==0 -cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys -check:rc==0 -cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys -check:output!~> -cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys -check:rc==0 end From ded4a006b2f5c5540e6e245f39770558f5de47c0 Mon Sep 17 00:00:00 2001 From: Wai Yee Wong Date: Tue, 7 Jun 2022 15:55:26 -0400 Subject: [PATCH 3/3] Check host keys supported by the operating system and report new ones if any --- .../autotest/testcase/install_xCAT/case0 | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index 35183600a..e41499802 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -20,8 +20,17 @@ cmd:service xcatd status check:rc==0 check:output=~running cmd:rm -rf /install_xCAT_xcat-core.tar.bz2 /install_xCAT_xcat-dep.tar.bz2 -end +# Check host keys supported by the operating system and report new ones, if any. +cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys +check:rc==0 +cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys +check:rc==0 +cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys +check:output!~> +cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys +check:rc==0 +end start:install_xCAT_on_ubuntu description:install xCAT with go-xcat tool in a fresh environment for ubuntu @@ -57,6 +66,14 @@ cmd:service conserver stop cmd:sleep 5 cmd:service goconserver status cmd:service conserver status + +# Check host keys supported by the operating system and report new ones, if any. +cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys +check:rc==0 +cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys +check:rc==0 +cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys +check:output!~> +cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys +check:rc==0 end - -