ssh otherhost /bin/bash << EOF ls some_folder; ./someaction.sh 'some params' pwd ./some_other_action 'other params' EOF
cat commands-to-execute-remotely.sh | ssh blah_server