MQTT – User Authentication

MQTT broker can be setup to requires username and password before clients can connect to the broker.

Related Topics

Setup Mosquitto MQTT broker to use username and password

Create a file with username and password. Add the username and password separated by colon in separate lines as shown below.

Encrypt the file that contains the password.

Verify that the password file is encrypted,

Once the password file is created, edit the mosquitto.conf file to enable the username and password by,

  • set allow_anonymous to false
  • Set the folder location of the the password_file

Keywords: Module , M2M , GPRS , 3G , through AT commands,