Is there an existing tool that does something like:

  1. Download an existing program from a remote server to local machine when the remote machine signals.
  2. Execute it automatically.

Otherwise is it possible to do it with ssh?

Please notice that running a command on ssh starts the program on the remote machine rather than local.

  • What is the purpose of the downloading and running of code? A job queue system? Something else? – thrig Jan 30 '17 at 23:23
  • The program is being developed on machine A. It must run on every new version automatically on machine B. I need to avoid the manual updating and re-running and I'm not planning to develop an auto-updater right now. – felknight Jan 30 '17 at 23:26
  • 1
    Sounds something like CI - github.com/kahun/… – thrig Jan 30 '17 at 23:37
  • Yea that was what I was looking for. Thanks – felknight Jan 30 '17 at 23:51
  • How should the remote machine signal that the copy is ready to be downloaded? Or can we use the remote machine to push a copy to the local machine for execution? – roaima Jan 31 '17 at 0:56

A simple shell script could do this.

I hope I understood correctly.


# send file from machine A to machine B
scp /path/on/machineA/binary user@MachineB:/path/on/machineB/binary

# ssh into machine B and launch machineB.sh
ssh user@MachineB /path/to/machineB.sh


# execute file on machine B
chmod +x /path/on/machineB/binary

Run script from machine A each time you need to test new program. Can be done as a final part of a build script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.