[openssh-commits] [openssh] 02/02: Test hostbased auth on github runners.

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Aug 10 17:58:48 AEST 2022


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit fdbd5bf507fc271ff813714fab8a72ff2c6cb5ca
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Wed Aug 10 17:35:52 2022 +1000

    Test hostbased auth on github runners.
---
 .github/run_test.sh         | 14 ++++++++++++++
 .github/workflows/c-cpp.yml |  1 +
 2 files changed, 15 insertions(+)

diff --git a/.github/run_test.sh b/.github/run_test.sh
index adf2568a..7ea216b8 100755
--- a/.github/run_test.sh
+++ b/.github/run_test.sh
@@ -6,6 +6,20 @@
 
 set -ex
 
+# If we want to test hostbased auth, set up the host for it.
+if [ ! -z "$SUDO" ] && [ ! -x "$TEST_SSH_HOSTBASED_AUTH" ]; then
+    sshconf=/usr/local/etc
+    hostname | $SUDO tee $sshconf/shosts.equiv >/dev/null
+    echo "EnableSSHKeysign yes" | $SUDO tee $sshconf/ssh_config >/dev/null
+    $SUDO mkdir -p $sshconf
+    $SUDO cp -p /etc/ssh/ssh_host*key* $sshconf
+    $SUDO make install
+    for key in $sshconf/ssh_host*key*.pub; do
+        echo `hostname` `cat $key` | \
+            $SUDO tee -a $sshconf/ssh_known_hosts >/dev/null
+    done
+fi
+
 output_failed_logs() {
     for i in regress/failed*; do
         if [ -f "$i" ]; then
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 8f6bd75e..0ff56f03 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -99,6 +99,7 @@ jobs:
       run: ./.github/run_test.sh ${{ matrix.configs }}
       env:
         TEST_SSH_UNSAFE_PERMISSIONS: 1
+        TEST_SSH_HOSTBASED_AUTH: yes
     - name: save logs
       if: failure()
       uses: actions/upload-artifact at v2

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list