Changeset - d46f6d0254d1
[Not reviewed]
master
0 1 0
x - 23 months ago 2022-06-15 18:26:47
xbr@c3l.lu
Add further documentation in README
1 file changed with 15 insertions and 0 deletions:
0 comments (0 inline, 0 general)
README.md
Show inline comments
 
@@ -3,12 +3,19 @@ These scripts automate the [Command and Control](https://wiki.c3l.lu/doku.php?id
 

	
 
Note that git submodules **must** be initalized, they contain crucial information such as the [SSH host keys and the public key of autom8](https://projects.c3l.lu/ChaosStuff/cnc-host-keys). Special access is needed.
 

	
 
## How to use
 
Flash the image on the eMMC using the flashEMMC.sh script (see section). Then use ansible.sh to install and configure the installation.
 

	
 
It is possible that your SSH agent might break some things: unlocked keys seem to be prioritized over a manually input key (using -i) and a password (challenge) authentication. This results in the server disconnecting the user with a "Too many authentication failures" error.
 

	
 
To avoid this, "crippling" the SSH agent might be necessary:
 
```bash
 
export SSH_AUTH_SOCK=/dev/null
 
```
 

	
 
### Structure of submodule
 
```
 
files
 
├── autom8_public_key
 
├── mcr-alpha
 
│   └── ssh_host_*
 
@@ -39,6 +46,14 @@ It shows the user information about the block device they indicated, asking if i
 

	
 
### ansible.sh
 
Usage: 
 
`sudo ./ansible.sh [playbook file, if none, site.yml]`
 

	
 
It simply verifies that the ansible requirements.txt are met and runs through the specific playbook.
 

	
 
### init.sh
 
This script used by the "localKey" role to setup key-based authentication.
 

	
 
It generates a local ed25519 ssh key in case it doesn't exist, then copies it over with ssh-pass and ssh-copy-id to each of the given hosts.
 

	
 
Each parameter is a different host. For example, setting up key based authentication on `mcr-alpha.lan` and `mcr-beta.lan`:
 
`./init.sh "mcr-alpha.lan" "mcr-beta.lan"`
0 comments (0 inline, 0 general)