5

How can I encrypt/hide my - wpa-psk "password" - line in the /etc/network/interfaces file? Since it's uncovered and readable for everyone who can get in the file now.

Or is it better that I use something else if I don't want to store my blank wifi password in a file?

I'm running on debian without desktop environment.

Bastonje
  • 53
  • 1
  • 3

1 Answers1

8

The best you can do is hash the password. Set wpa-psk to the output of:

wpa_passphrase <SSID> <KEY>

This will obfuscate the password, but it will not prevent someone else from using the hash to connect with another device.

As an additional measure you should also set /etc/network/interfaces file permission to rw------- (600), chmod og-rw.

h0tw1r3
  • 773
  • 5
  • 10