Ejecute el script de shell de forma remota usando ssh

ssh root@MachineB 'bash -s' < local_script.sh
Magnificent Magpie