mirror of
https://github.com/appleboy/ssh-action.git
synced 2024-11-23 06:16:10 +08:00
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:
parent
5a8776fd15
commit
0c7561b1a3
3
.github/workflows/ssh-server.yml
vendored
3
.github/workflows/ssh-server.yml
vendored
@ -368,7 +368,6 @@ jobs:
|
|||||||
-e PUBLIC_KEY="${{ env.PUBLIC_KEY }}" \
|
-e PUBLIC_KEY="${{ env.PUBLIC_KEY }}" \
|
||||||
-e SUDO_ACCESS=true \
|
-e SUDO_ACCESS=true \
|
||||||
-e PASSWORD_ACCESS=true \
|
-e PASSWORD_ACCESS=true \
|
||||||
-e USER_PASSWORD=password \
|
|
||||||
-e USER_NAME=linuxserver.io \
|
-e USER_NAME=linuxserver.io \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
lscr.io/linuxserver/openssh-server:latest
|
lscr.io/linuxserver/openssh-server:latest
|
||||||
@ -465,7 +464,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
host: ${{ env.REMOTE_HOST }}
|
host: ${{ env.REMOTE_HOST }}
|
||||||
username: linuxserver.io
|
username: linuxserver.io
|
||||||
password: password
|
key: ${{ env.PRIVATE_KEY }}
|
||||||
port: 2222
|
port: 2222
|
||||||
script_stop: true
|
script_stop: true
|
||||||
request_pty: true
|
request_pty: true
|
||||||
|
Loading…
Reference in New Issue
Block a user