fix: switch to SSH key authentication for security

- Remove hardcoded user password from environment variables
- Replace hardcoded password with a private key for SSH authentication

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy 2024-06-05 21:35:45 +08:00
parent 5a8776fd15
commit 0c7561b1a3
No known key found for this signature in database

View File

@ -368,7 +368,6 @@ jobs:
-e PUBLIC_KEY="${{ env.PUBLIC_KEY }}" \
-e SUDO_ACCESS=true \
-e PASSWORD_ACCESS=true \
-e USER_PASSWORD=password \
-e USER_NAME=linuxserver.io \
--restart unless-stopped \
lscr.io/linuxserver/openssh-server:latest
@ -465,7 +464,7 @@ jobs:
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
password: password
key: ${{ env.PRIVATE_KEY }}
port: 2222
script_stop: true
request_pty: true