Say I have the following Bash script stored in the file foo.sh:
foo.sh
#!/bin/bash echo foo
Without having to scp the fi
scp
You can use runoverssh:
sudo apt install runoverssh
runoverssh -s localscript.sh user host
-s runs a local script remotely
-s