linux execute local script on remote server code example Example: Running a local script on a remote machine (or remote on local) ssh [email protected] 'bash -s' < scriptfile.sh