https://github.com/sonnyyu/mtls-cert-manage
cd ~/mtls-cert-manage/pki
./server.sh
./client.sh
cd ~/mtls-cert-manage/pki/servercerts
cp * ~/mtls-mosquitto/certs
cd ~/mtls-cert-manage/pki/clientcerts
cp * ~/mtls-mosquitto/certs
cd ~/mtls-mosquitto
docker-compose build
docker-compose up -d
docker-compose down
docker-compose down -v
cd ~/mtls-mosquitto/certs/
mosquitto_sub -p 8883 --cafile ca.crt --cert client1.crt --key client1.key -h 192.168.1.204 -t msg
# Start a an other SSH session from the command line
mosquitto_pub -p 8883 --cafile ca.crt --cert client1.crt --key client1.key -h 192.168.1.204 -t msg -m "test"