diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a3dc5a..5af1669 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,10 @@ jobs: sudo apt install openssh-server sudo sh -c 'echo "ChallengeResponseAuthentication no" >> /etc/ssh/sshd_config' sudo sh -c 'echo "PasswordAuthentication no" >> /etc/ssh/sshd_config' + sudo sh -c 'echo "\nMatch User usr2" >> /etc/ssh/sshd_config' + sudo sh -c 'echo "\tPasswordAuthentication yes" >> /etc/ssh/sshd_config' + sudo sh -c 'echo "\nMatch User All" >> /etc/ssh/sshd_config' + sudo sh -c 'echo "\tPasswordAuthentication no" >> /etc/ssh/sshd_config' sudo systemctl enable ssh sudo systemctl start ssh @@ -56,6 +60,9 @@ jobs: sudo chmod 664 /home/usr/.ssh/authorized_keys cp ~/.ssh/sftptest ${GITHUB_WORKSPACE}/sftp-connector-test/src_test/com/axonivy/connector/sftp/test/sftptest + echo "adding user 2 to group ${sshGroup}" + sudo useradd -s /bin/bash -d /home/usr2 -m -g ${sshGroup} -p $(echo pwd | openssl passwd -1 -stdin) usr2 + - name: Setup Maven uses: stCarolas/setup-maven@v5 with: