Given a list of servers, this script connects using SSH on each server, retrieving HTTP server's hosts and their ports, outputting CSV files with that relation (a CSV file for each server), and then joining all those files in an xlsx spreadsheet.
This is a CSV file output example:
Porta, Hosts
8080,prod.server.com
8081,test.server.com
- Copy
config.yaml.exampletoconfig.yaml - Edit according to your needs
- If
key_pathis not provided, the script will use your local SSH key. - Install the dependencies with:
pip3 install -r requirements.txt
You can run the script with the following command
python3 http-host-to-csv.py