Scriptd lets you execute a set of preconfigured scripts or executables via HTTP API, securely, without exposing terminal access, and with almost no configurations.
Project description
Scriptd
Scriptd lets you execute a set of preconfigured scripts or executables via HTTP API, securely, without exposing terminal access, and with almost no configurations.
Designed for remote job automation when direct SSH is not desirable, Scriptd helps you deal with situations when your development server is behind firewalls or your corporation's security policy forbids direct SSH access. Write down your code updating / building / deployment commands as scripts and you are good to go with HTTP access only. And no, you are not exposing your server to code injections: only your preconfigured scripts are allowed to run.
Features
- Setting up preconfigured scripts as HTTP API for remote job automation.
- Almost zero configuration: a work directory with your scripts inside, and a secret key, that's all.
- No terminal exposure: scriptd does not run any code or parameters from client requests, only your preconfigured scripts. No code injection.
- Security: encryption & authentication with AES-256-GCM.
Usage
Server
scriptd [-h] [-H HOST] [-p PORT] [-k KEY | --key-file KEY_FILE] [-d DIR]
optional arguments:
-h, --help show this help message and exit
-H HOST, --host HOST Host name to listen on, default: 0.0.0.0
-p PORT, --port PORT Port to listen on, default: 8182
-k KEY, --key KEY Authentication key, default: empty
--key-file KEY_FILE Authentication key file. Key will be derived from its hash.
-d DIR, --dir DIR Working directory, default: current dir
Client
scriptc [-h] [-H HOST] [-p PORT] [-k KEY | --key-file KEY_FILE] command
positional arguments:
command Name of the script to run on server
optional arguments:
-h, --help show this help message and exit
-H HOST, --host HOST Server ip or name, default: 127.0.0.1
-p PORT, --port PORT Server port, default: 8182
-k KEY, --key KEY Authentication key, default: empty
--key-file KEY_FILE Authentication key file. Key will be derived from its hash.
Example usage
On your server, put your scripts in a directory named ~/scriptd_home
. It is strongly advised that you keep this directory and any file under it accessable only to yourself.
Prepare an arbitrary-sized key-file that acts as the secret key. Name it ~/scriptd_home/key
and put it on both client and server.
Run scriptd --key-file ~/scriptd_home/key -d ~/scriptd_home
to start the server.
You can now invoke scripts in scriptd_home
remotely from clients with:
scriptc -H <your-server> --key-file <key-file-path> <script-name>
Scripts will be invoked from ~/scriptd_home
on your server. Both stdout and stderr of the invoked script will be sent to your client encrypted.
Installation
To install scriptd simply run:
pip install -U scriptd
To install to a Unix global python environment use
sudo -H pip install -U scriptd
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scriptd-0.5.1.tar.gz
.
File metadata
- Download URL: scriptd-0.5.1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.13.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f70ecf936501b01bece0a1147b79357094d7760e7d105f87e1d1d6bbcca440d |
|
MD5 | e74d12f233f84664ba97aed9e6285907 |
|
BLAKE2b-256 | e223e8ce02a5c0381eaf7d4cc5e451462388d6eb98be2f094492c44bdf3c6a7a |
File details
Details for the file scriptd-0.5.1-py2-none-any.whl
.
File metadata
- Download URL: scriptd-0.5.1-py2-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.13.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bc24e97596624062097336efeff83617214853817c083c444af6d994d2b4d26 |
|
MD5 | cf37d450ccbfc5019564ef9616a784bf |
|
BLAKE2b-256 | b15a6ea2486987a0bf7b5dd33d31c8f18bd4793fc2b4440163e8968270f66ec7 |