diff --git a/deploy.sh b/deploy.sh index a7d260c..ba4ef2a 100755 --- a/deploy.sh +++ b/deploy.sh @@ -24,6 +24,8 @@ SERVER_HOST="10.42.0.73" SERVER_PATH="/home/user/pounce" SERVER_PASS="user" SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" +# Force a TTY for password auth + sudo on some hosts +SSH_CMD="ssh -tt $SSH_OPTS -o PreferredAuthentications=password -o PubkeyAuthentication=no" if ! command -v sshpass >/dev/null 2>&1; then echo -e "${RED}✗ sshpass is required but not installed.${NC}" @@ -117,7 +119,7 @@ fi # Step 3: Reload backend (graceful, no restart) if ! $FRONTEND_ONLY; then echo -e "\n${YELLOW}[3/4] Reloading backend (graceful)...${NC}" - sshpass -p "$SERVER_PASS" ssh $SSH_OPTS $SERVER_USER@$SERVER_HOST << 'BACKEND_EOF' + sshpass -p "$SERVER_PASS" $SSH_CMD $SERVER_USER@$SERVER_HOST << 'BACKEND_EOF' set -e cd ~/pounce/backend @@ -177,7 +179,7 @@ fi # Step 4: Rebuild frontend (in background to minimize downtime) if ! $BACKEND_ONLY; then echo -e "\n${YELLOW}[4/4] Rebuilding frontend...${NC}" - sshpass -p "$SERVER_PASS" ssh $SSH_OPTS $SERVER_USER@$SERVER_HOST << 'FRONTEND_EOF' + sshpass -p "$SERVER_PASS" $SSH_CMD $SERVER_USER@$SERVER_HOST << 'FRONTEND_EOF' set -e cd ~/pounce/frontend