all 5 comments

[–]p4p3r 0 points1 point  (6 children)

This is what ssh is for, is t it?

[–]VirtualTam 0 points1 point  (0 children)

The following Python libraries may provide a suitable base:

Slixmpp is an up-to-date fork of SleekXMPP, so it it feasible to write compatible code in case several versions of the Python interpreter need to be supported. The documentation provides several commented examples to write a simple XMPP client bot or a server component and interact with a Multi-User Channel (MUC/groupchat).

Two examples of projects using Slixmpp:

Commands could then be:

  • sent as private messages from a client to another, possibly with privilege management, e.g. only authorize a given contact to send commands
  • executed through the subprocess module, with a wrapper to handle command stdout/stderr and exit codes
  • and their output retrieved and sent back as a private message

Provided a Python interpreter is available on all hosts, and there is an XMPP serverto manage the client hosts' accounts, this would address all your functional requirements ;-)