Skip to content

Commit

Permalink
ci: enhance SSH job testing with varied key/password scenarios
Browse files Browse the repository at this point in the history
- 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 <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Jun 5, 2024
1 parent da612c8 commit acd41e5
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/ssh-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,31 @@ 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 }}
username: linuxserver.io
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

0 comments on commit acd41e5

Please sign in to comment.