

If you have a Zeroconf network service installed (Apple’s iTunes or Bonjour install Zeroconf), you can SSH into (provided you don’t have any other Pi computers on your network with the same default hostname). Give your Pi some time to boot and connect to your network (the first boot always takes longer), then you should be able to SSH into the Pi and configure it how you like. If it finds a wpa_nf file, it will move it to its correct location and connect to your wireless network. If Raspbian finds an ssh file it will enable SSH and delete the file. Safely eject the card from your PC and use it to boot the Pi. Make sure that both files are in the main directory of the small FAT32 partition, not in any folder. Use a pure text editor like Notepad++, not a word processor, to edit the wpa_nf file. Use the 2 letter country abbreviation in CAPS (without this you will have no WiFi).

To connect to a wireless network, create another file on the card called wpa_nf, which has the following inside:Ĭtrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevĮdit country=, ssid= and psk= with your information and save the file. It can be empty, the contents don’t matter.

On that small FAT32 partition, create a file with the name ssh (or ssh.txt). If you get a message telling you the card must be formatted, cancel it. Remove and reinsert the SD card so that your Windows or Mac PC can see the small FAT32 partition on the card (labelled “boot”). Writing an image to your card will erase everything previously on it! If you have trouble, verify the SHA256 checksum of the download. zip you downloaded, pick your SD card and write. You don’t need to extract the image or format the card prior to writing. Install Etcher and use it to write the Raspbian image to your SD card. Everything is done before you boot, and can be done on a Windows or Mac computer which only has access to the small FAT32 “boot” partition of a Raspbian imaged SD card. It works with Raspbian Jessie or Stretch, Desktop or Lite, and with the built-in WiFi on the Pi3B(+), Pi Zero W, or a Raspbian compatible USB WiFi dongle on other models. Most local network use WPA2-PSK (AES), and this is the procedure used here for setting up headless boot with SSH and wireless network. From the rapsberri Pi forum written by Hawaiianpi
