Oh, while transferring!
ssh -t [email protected] 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.