I\'ve searched around a bit for similar questions, but other than running one command or perhaps a few command with items such as:
ssh user@host -t sudo su -
You can pipe the local script to the remote server and execute it with one command:
ssh -t user@host 'sh' < path_to_script
This can be further automated by using public key authentication and wrapping with scripts to perform parallel execution.