I mostly use ssh and tar instead of scp, because I'm usually after more than one file.
Like, "ssh remote 'cd /whatever; tar -cf - someglobpattern' | tar -xvf"
Like, "ssh remote 'cd /whatever; tar -cf - someglobpattern' | tar -xvf"
So...
> ssh remote 'cd /whatever && tar -cf - someglobpattern' | tar -xvf
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.