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.


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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.