diff --git a/.github/workflows/deploy-service.yml b/.github/workflows/deploy-service.yml index 430f3c1..9d12979 100644 --- a/.github/workflows/deploy-service.yml +++ b/.github/workflows/deploy-service.yml @@ -204,8 +204,10 @@ jobs: if [ -n "${DEPLOY_SSH_KNOWN_HOSTS}" ]; then printf '%s\n' "${DEPLOY_SSH_KNOWN_HOSTS}" > ~/.ssh/known_hosts + STRICT_MODE="yes" else - ssh-keyscan -p "${DEPLOY_PORT}" -H "${DEPLOY_HOST}" >> ~/.ssh/known_hosts 2>/dev/null + ssh-keyscan -p "${DEPLOY_PORT}" -t ed25519,ecdsa-sha2-nistp256,rsa "${DEPLOY_HOST}" >> ~/.ssh/known_hosts 2>/dev/null + STRICT_MODE="accept-new" fi chmod 644 ~/.ssh/known_hosts @@ -215,7 +217,7 @@ jobs: echo " Port ${DEPLOY_PORT}" echo " User ${DEPLOY_USER}" echo " IdentityFile ~/.ssh/id_ed25519" - echo " StrictHostKeyChecking yes" + echo " StrictHostKeyChecking ${STRICT_MODE}" } > ~/.ssh/config chmod 600 ~/.ssh/config