I have scripts in several languages which I pipe to
ssh to have them invoked on other hosts. For shell scripts I'm able to do this:
ssh < /path/to/script.sh
For scripts in other languages however, I find myself having to do this:
ssh python - < /path/to/script.py
Locally I can run the scripts without specifying the interpreter, due to their shebang lines, and executable bits.
How can I have
ssh execute scripts regardless of language by invoking the appropriate interpreter from the shebang? Is there something I can have
ssh invoke regardless of scripts language to do this?
ssh invocation is part of yet another script which I am developing, this is strictly specific to coding and not server management.