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 <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2024-06-05 15:57:27 +08:00
parent da612c8015
commit acd41e5091
No known key found for this signature in database
1 changed files with 21 additions and 1 deletions

View File

@ -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