Skip to main content

Broker commands to a server

Project description

Command Broker


PyPI version Test Status Lint Status codecov Join the chat at https://gitter.im/brad/cmdbroker License Code style: black


Read Latest Documentation - Browse GitHub Code Repository


cmdbroker Broker commands to a server

Overview

Command Broker (cmdbroker) is a tool that allows a client to send commands to a server and get the results back. While for most use cases you can simply run commands over SSH, cmdbroker is designed for scenarios where you need to run commands with access to the server's UI. This can be particularly useful for commands that require graphical interfaces or other UI elements that are not accessible through standard SSH sessions.

Features

  • Client-Server Architecture: cmdbroker uses a client-server model to facilitate command execution and result retrieval.
  • SSL Encryption: All communications between the client and server are secured using SSL, ensuring that data is encrypted and protected from eavesdropping.
  • UI Access: Enables running commands that require access to the server's UI, which is not possible with standard SSH.
  • Easy Integration: Simple to integrate into existing workflows and systems.

Installation

You can install cmdbroker using pip:

pip install cmdbroker

Usage

Server

cmdbroker --server

This will walk you through generating an SSL certificate and then start the server. Protect the generated key with chmod 600 broker-key.pem. Copy the generated broker-cert.pem file to your client machine (after copying, protect it with a similar chmod) and follow the instructions for the client

Client

cmdbroker 'echo "Hello, World!"'

The following happens when you do this:

  • The client makes a secure connection to the server
  • The client sends the command to the server over this connection
  • The server component runs echo "Hello, World!"
  • The server component takes the output from that command and returns it to the client
  • The client outputs the results on stdout

You may also redirect stdin and use it in the server-side command, ex:

echo "Hello, World\!" | cmdbroker cat

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmdbroker-0.0.4.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

cmdbroker-0.0.4-py3-none-any.whl (8.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page