From 41c46db50a841b6aadd0e1394bbe7a6c59b16632 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Jul 28 2019 18:05:40 +0000 Subject: Fix openssh test in CentOS8 --- diff --git a/tests/p_openssh/sshd_user_login-with-key.sh b/tests/p_openssh/sshd_user_login-with-key.sh index b07a680..d3e7887 100755 --- a/tests/p_openssh/sshd_user_login-with-key.sh +++ b/tests/p_openssh/sshd_user_login-with-key.sh @@ -1,6 +1,11 @@ #!/bin/sh -for KeyType in rsa dsa; do +keytypes="rsa" +if [ "$centos_ver" -lt 8 ] ; then +keytypes="$keytypes dsa" +fi + +for KeyType in $keytypes; do userdel -rf sshtest; useradd sshtest && echo sshtest | passwd --stdin sshtest runuser -l sshtest -c "echo | ssh-keygen -q -t ${KeyType} -b 1024 -f ~/.ssh/id_${KeyType}" > /dev/null runuser -l sshtest -c "cat ~/.ssh/*pub > ~/.ssh/authorized_keys && chmod 600 ~/.ssh/*keys" > /dev/null