From 0c7561b1a30e223b97730bb8b92671995d9fb1d0 Mon Sep 17 00:00:00 2001 From: appleboy Date: Wed, 5 Jun 2024 21:35:45 +0800 Subject: [PATCH] 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 --- .github/workflows/ssh-server.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ssh-server.yml b/.github/workflows/ssh-server.yml index 1599b96..1719cf6 100644 --- a/.github/workflows/ssh-server.yml +++ b/.github/workflows/ssh-server.yml @@ -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