This question already has an answer here:
Usually it's just
ssh buildserver /path/to/build.sh
You may need to tweak the options though.
ssh <HOST> <COMMAND> in a single line. If you can already log in using keys you won't have to type a password. Example:
$ ssh localhost 'echo hi' hi
<COMMAND> is run synchronously. That means that
ssh won't finish until
<COMMAND> run on the remote server has finished. See yourself:
$ ssh localhost 'sleep 10'
This command will wait for 10 seconds and you won't be able to type new commands until it's finished.
您可以使用管道（假设您使用* nix OS）：
echo "your --command --here" | ssh user@host