Улучшение конфигурации SSH: добавлено управление режимом проверки ключей хоста
Deploy scripts to remote server / Upload and deploy on 192.168.10.14 (push) Failing after 2s

This commit is contained in:
Dmitriy Fofanov
2026-02-25 00:16:00 +03:00
parent dd4090cde4
commit cc5e79f96a
+4 -2
View File
@@ -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