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>
pull/330/head
Bo-Yi Wu 7 months ago
parent da612c8015
commit acd41e5091
No known key found for this signature in database

@ -82,7 +82,7 @@ jobs:
echo "======================================" echo "======================================"
sleep 2 sleep 2
- name: ssh by private - name: ssh by private key
uses: appleboy/ssh-action@v1.0.3 uses: appleboy/ssh-action@v1.0.3
with: with:
host: ${{ env.REMOTE_HOST }} host: ${{ env.REMOTE_HOST }}
@ -90,3 +90,23 @@ jobs:
key: ${{ env.PRIVATE_KEY }} key: ${{ env.PRIVATE_KEY }}
port: 2222 port: 2222
script: whoami 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

Loading…
Cancel
Save