ding/README.md

45 lines
2.7 KiB
Markdown
Raw Normal View History

2017-09-30 12:51:23 +00:00
# ding
## What is ding?
2018-02-01 21:14:32 +00:00
ding is a client-server thing written in python3. Its aim is to execute a set of commands remotely. The commands can be set in the server's config file.
2017-09-30 12:51:23 +00:00
## How does it work?
2018-02-01 21:14:32 +00:00
The server will wait for a command to be sent by a client. If the command is present within the server's config file it will then execute the command, else nothing will happen.
2017-09-30 12:51:23 +00:00
## What about ding's security?
2018-02-01 01:54:35 +00:00
The authentication is done via a SSL Client Certificate signed by an (self generated) Certificate Authority. The scripts for generating a CA and signing the Server/Client Certificates are also included to make it (relatively) easy. [ This involves typing in a few certificate details and entering a previously defined CA password. ]
2017-09-30 12:51:23 +00:00
2017-10-02 11:31:14 +00:00
## Pic or didn't happen
2018-02-01 00:36:25 +00:00
![Screenshot of ding](/img/dingScreenshot.png)
2017-10-02 11:47:12 +00:00
[Can't read a thing?](https://raw.githubusercontent.com/Bandie/ding/master/img/dingScreenshot.png)
2017-09-30 12:51:23 +00:00
2018-02-01 13:09:35 +00:00
## Requirements
* Install python3 on your target computers.
2017-09-30 12:51:23 +00:00
## Installation
2018-02-01 01:54:35 +00:00
At every step please read carefully what the generate certificates scripts want from you. The information on the certificates doesn't need to be true and can be totally random. They only need to be different from one another.
2017-09-30 12:51:23 +00:00
2018-02-01 13:09:35 +00:00
Step 1 to 3 can only be run on UNIX or GNU/Linux.
2017-09-30 12:51:23 +00:00
1. Run `./1_generateCA.sh` to generate a CA.
2. Run `./2_generateServCert.sh` to generate a signed Server Certificate.
3. Run `./3_generateClientCert.sh` to generate a signed Client Certificate.
4. Move `ding_client`, `ding_client.cfg`, `ding_client.crt`, `ding_client.key` and `CA.crt` to the computer which should be able to send commands to the server.
2018-02-01 13:09:35 +00:00
* UNIX or GNU/Linux: Also move `ding_client.cfg` to that computer.
* Windows: Also move `ding_client.win.cfg` to that computer.
5. Do some configuration on the server and client (ding\_server.cfg, ding\_client.cfg or ding\_server.win.cfg, ding\_client.win.cfg on Windows).
6. Start the server using `./ding_server` or `python .\ding_server` on Windows. (You may want to put this in a tmux session. [Ctrl+B, D] ;) ).
7. Try out the client using `./ding_client <command>` òr `python .\ding_client <command>` on Windows.
2017-09-30 12:51:23 +00:00
2018-02-01 00:36:25 +00:00
## Optional: Cleartext password with timeout
2018-02-01 01:54:35 +00:00
If you want to be sure that this power won't be abused by bad people using your computer, you may want to add a password (saved in cleartext).
The password will be sent inside the TLS connection.
2017-09-30 12:51:23 +00:00
2018-02-01 00:36:25 +00:00
To do so:
2018-02-01 13:09:35 +00:00
1. Open your `ding_server.cfg` or `ding_server.win.cfg`.
2018-02-01 00:36:25 +00:00
2. Set `pw_on=true`.
3. Set a password, like `password=abc def`.
4. Set a password timeout: `pwtimeout=10` for 10 seconds.
2018-02-01 13:09:35 +00:00
If you have a password with special characters as in spaces and the like, you may want to use quotation marks around your password. `./ding_client "abc def"` or `python .\ding_client "abc def"` on Windows.