From 35e9756525edacebc732df0ee82d6223ba8b847a Mon Sep 17 00:00:00 2001 From: Adrian Amaglio Date: Wed, 17 Feb 2021 14:19:28 +0100 Subject: [PATCH] better doc --- test-python-ssh/Readme.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test-python-ssh/Readme.md b/test-python-ssh/Readme.md index 5380b39..b61041e 100644 --- a/test-python-ssh/Readme.md +++ b/test-python-ssh/Readme.md @@ -6,6 +6,12 @@ This is a very experimental tool, **it may be working**. Any suggestion or PR is ## Install docker https://docs.docker.com/get-docker/ +## Initialize it +The directory `config` must contain a `users.txt`, containing one username per line, or a `passwords.txt` file, containing `username=password` lines. +If you do not provide a password file, it will be generated from user file. +The password file is the database from which users/passwords are created in the system. +Aditionnaly, you can add a file named `./config/init.sh` which will be executed (as root) before starting the servers. It is usefull for debuging and customisation purposes! + ## Run it While in this file directory, open a terminal and run the following command (the download can be very long…). ``` @@ -13,11 +19,6 @@ docker run -it --name pythonsandbox --rm --network host -v "$(pwd)"/production_e ``` (Logs will flow in your terminal, CTRL+C will stop the process). -## Initialize it -The directory `config` must contain a `users.txt` containing one username per line, or a `passwords.txt` file, containing `username=password` lines. -If you do not provide a password file, it will be generated from user file. -The password file is the database from which users/passwords are created in the system. -APermitRootLogindditionnaly, you can add a file named `./config/init.sh` which will be executed (as root) before starting the servers. It is usefull for debuging and customisation purposes! ## Use it You can now ssh into your localhost (and others computer on the same network can ssh into your host). @@ -25,7 +26,7 @@ Usernames and passwords are the one provided in the password file. Students home directories are then listed in the `production_eleves` directory. ## Debug it -You can open a shell in the container anytime by running this command on the docker host: +You can open a shell (as root) in the container anytime by running this command on the docker host: ``` docker exec -it pythonsandbox bash ```