

Raspberry Pi setup that automatically enables SSH remote terminal login, AND connects to your WiFi (very useful for running headless / without a desktop interface)...


--------------------------------------------------------------------------


Step #1) Create a normal disk image on a MicroSD card.


--------------------------------------------------------------------------


Step #2) Open the 'boot' partition of the MicroSD card on your PC.


--------------------------------------------------------------------------


Step #3) Add a new blank file in the boot partition named: ssh


--------------------------------------------------------------------------


IMPORTANT NOTE: AUTOMATIC WIFI SETUP ONLY WORKS ON 'LEGACY' VERSION OF THE OPERATING SYSTEM!


Step #4) Add a new blank file in the boot partition named: wpa_supplicant.conf


--------------------------------------------------------------------------


Step #5) Open the new file 'wpa_supplicant.conf' with a text editor.


--------------------------------------------------------------------------


Step #6) Copy / paste the following code into the file 'wpa_supplicant.conf':


ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="YOUR_WIFI_NAME"
    psk="YOUR_WIFI_PASSWORD"
    key_mgmt=WPA-PSK
}


--------------------------------------------------------------------------


Step #7) Add your WiFi name / password in 'wpa_supplicant.conf', and save / close the file.


--------------------------------------------------------------------------


Step #8) Create an ENCRYPTED password for your user login with this command:

echo 'mypassword' | openssl passwd -6 -stdin


--------------------------------------------------------------------------


Step #9) Add a new blank file in the boot partition named: userconf.txt 


--------------------------------------------------------------------------


Step #10) Open the new file 'userconf.txt' with a text editor.


--------------------------------------------------------------------------


Step #11) Add your username / ENCRYPTED password in 'userconf.txt':


YOUR_USERNAME_HERE:YOUR_ENCRYPTED_PASSWORD_HERE


--------------------------------------------------------------------------


Step #12) Save / close the file.


--------------------------------------------------------------------------


OPTIONAL Step #13) Once running the Pi, if you want to decrease memory usage / system load, AND you only plan to run it HEADLESS (NOT USE the desktop interface): Run "sudo raspi-config", choose "Boot Options" => "Desktop / CLI" => "Console", and reboot.



