From acd41e5091e04c5db86c78f86723e9baec27f452 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 5 Jun 2024 15:57:27 +0800 Subject: [PATCH] ci: enhance SSH job testing with varied key/password scenarios - Correct the name of the SSH job from "ssh by private" to "ssh by private key" - Add a job to test SSH with the correct key but wrong password - Add a job to test SSH with the correct password but wrong key Signed-off-by: Bo-Yi Wu --- .github/workflows/ssh-server.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ssh-server.yml b/.github/workflows/ssh-server.yml index 0a19104..cfe805c 100644 --- a/.github/workflows/ssh-server.yml +++ b/.github/workflows/ssh-server.yml @@ -82,7 +82,7 @@ jobs: echo "======================================" sleep 2 - - name: ssh by private + - name: ssh by private key uses: appleboy/ssh-action@v1.0.3 with: host: ${{ env.REMOTE_HOST }} @@ -90,3 +90,23 @@ jobs: key: ${{ env.PRIVATE_KEY }} port: 2222 script: whoami + + - name: wrong password but correct key + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ env.REMOTE_HOST }} + username: linuxserver.io + password: "abcdef" + key: ${{ env.PRIVATE_KEY }} + port: 2222 + script: whoami + + - name: correct password but wrong key + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ env.REMOTE_HOST }} + username: linuxserver.io + password: password + key: password + port: 2222 + script: whoami