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