I have the impression you’re mis-interpreting how SSH subsystem works. If all you need is to execute a remote command from another machine, you can do something like:
[local]$ ssh $user@$remote ls
for example, and you’ll get the list of files in the home directory of $user in the @remote server.
If all you need is to execute
local_script.sh, I would copy that file over to the remote server and execute it from your local machine, with that syntax above.
You could also setup an SSH subystem on your remote server. If you have an subscription to Safari you can read more about SSH subsystems in the SSH book:
Share the content of your local_script if you can so we can give you some other ideas.