Från wiki.soltec.se
Hoppa till: navigering, sök

Create a bootable Pi image from source

  • Download your Pi image of choice.
  • Insert your SD card disk to your laptop/desktop and note down the ID of the mounted disk.
  • Unmount the SD HDD
  • To write an Pi image (img) file to SD HDD
 $ sudo dd bs=1m if=path_of_your_image.img of=/dev/rdiskn conv=sync

N.B! Remember to replace n with the number that you noted before!

Encrypt your wifi password

Adding the network details to the Raspberry Pi Open the wpa-supplicant configuration file:

 $ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Go to the bottom of the file and add the following:


The password can be configured either as the ASCII representation, in quotes as per the example above, or as a pre-encrypted 32 byte hexadecimal number.

SSID Password Encryption

You can use the wpa_passphrase utility to generate an encrypted PSK. This takes the SSID and the password, and generates the encrypted PSK. With the example from above, you can generate the PSK with wpa_passphrase "testing". Then you will be asked for the password of the WiFi network (in this case testingPassword). The output is as follows:


Note that the plain text version of the code is present, but commented out. You should delete this line from the final wpa_supplicant file for extra security.

The wpa_passphrase tool requires a password with between 8 and 63 characters.

For more complex passphrases you can extract the content of a text file and use it as input for wpa_passphrase, if the password is stored as plain text inside a file somewhere, by calling wpa_passphrase "testing" < file_where_password_is_stored.

For extra security, you should delete the file_where_password_is_stored afterwards, so there is no plain text copy of the original password on the system.

To use the wpa_passphrase–encrypted PSK, you can copy and paste the encrypted PSK into the wpa_supplicant.conf file,

N.B!! don't forget to remove the line with the plaintext password

 Source: Raspberry Wiki on Wifi Security