Running local script remotely

 ssh user@remote.machine 'bash -s' < local_script.sh