From 5eb8f436c49896ae3e6e8e9c09a9c4d91d55995a Mon Sep 17 00:00:00 2001 From: avinash Date: Thu, 2 Jul 2026 17:57:55 +0530 Subject: [PATCH] fix(redeploy): add host key verification to SSH command --- redeploy.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/redeploy.sh b/redeploy.sh index c477fc3..3774471 100755 --- a/redeploy.sh +++ b/redeploy.sh @@ -18,6 +18,10 @@ HOST=118.95.33.89 PORT=61 USER=root APPDIR=/opt/bizgaze-support +# Pinned server host key (SHA256). plink -batch won't prompt to cache an +# unknown key, so we pin it here. Verify against the fingerprint plink shows +# on first connect. Override with $DEPLOY_HOSTKEY if the server is rebuilt. +HOSTKEY="${DEPLOY_HOSTKEY:-SHA256:hxfv/hH5aplnM4wOsl+jLjWaXwEeceZ4Uz932/5IoCE}" DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" @@ -36,4 +40,4 @@ if [ -z "$PW" ]; then fi echo "==> Triggering deploy on $USER@$HOST ($APPDIR) …" -exec "$PLINK" -ssh -batch -P "$PORT" -pw "$PW" "$USER@$HOST" "cd $APPDIR && bash deploy.sh $*" +exec "$PLINK" -ssh -batch -hostkey "$HOSTKEY" -P "$PORT" -pw "$PW" "$USER@$HOST" "cd $APPDIR && bash deploy.sh $*"