Bash lets you suppress local expansions by using <<'EOF' instead of <<EOF.
But if you need a mix of local and remote expansion, you're back to doing a lot of escaping.
But if you need a mix of local and remote expansion, you're back to doing a lot of escaping.