even better
printf "<cmd>" | ssh bash
or cat cmd.sh | ssh bash
This passes all of stdin to the remote bash, avoiding any expansions happening on the local side entirely.