2

I recently changed the password of my WiFi and updated the file in the /boot folder of the OctoPrint's OS running on my Raspberry Pi.

Yet, it is now in plain text, and I would like to avoid storing it that way. What can I do to make the file more secure?

The automatic configuration from the Raspberry Pi imager generated an encrypted version of the password. But I'm not planning to flash everything again, so that's not an option.

Bob Ortiz
  • 1,255
  • 1
  • 10
  • 44
Myoch
  • 205
  • 2
  • 7

2 Answers2

3

There is no way to store it that's "more secure". In order to connect to the network, a device needs the password. The configuration tool you used likely just stored an encoded (which means roughly the opposite of encrypted, despite many people not understanding the difference) form of the password. To store it encrypted would require also storing a decryption key to decrypt and use it, but then whoever reads the SD card could just read the key too.

There is nothing special about a Raspberry Pi in this. Your PCs, phones, etc. all store wifi passwords in a form that can be read back, and that is read back every time they use them to connect to a network. If they don't make it easy for you the human user to read back the password, that's simply a user interface choice they've made to give you a false sense of safety, not any actual security boundary.

1

It's not a direct answer to the question but rather an alternative worth mentioning in this context. Avoid saving your password in plain text on the SD card of the Raspberry Pi by not to use WiFi and using an ethernet cable instead.

Bob Ortiz
  • 1,255
  • 1
  • 10
  • 44