Oh, while transferring!
ssh -t user@example.org bash <( echo "function do_it() {"; cat my-setup-script.sh; echo -e "}\ndo_it" )
Oh, while transferring!
No argument limits to worry about, no quoting hassles.