I have recently purchased a Pi Zero W and had no trouble getting SSH and wireless working with my normal procedure.
This is the procedure I use for setting up headless boot with SSH and wireless network. It works with Raspbian Stretch, Desktop or Lite, and with the built-in WiFi on the Pi3 & Zero W, or a Raspbian compatible USB WiFi dongle on other models (tested on an old model B, Pi2 and Pi Zero). Everything is done before you boot the SD card, 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.
- Grab the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/
- Grab the Etcher software from https://etcher.io/
- Install Etcher and use it to write the Raspbian image to your SD card. You don't need to extract the image or format the card prior to writing. Just choose the Raspbian .zip, pick your SD card and write (if you have trouble, verify the SHA256 checksum of the download).
- Remove and reinsert the SD card so that your Windows or Mac PC can see the small FAT32 partition on the SD card (labelled "boot").
- On that small partition, create a file with the name ssh (or ssh.txt). It can be empty, the contents don't matter.
- If you are connecting the Pi to your router with an Ethernet cable, then you can eject the card and use it to boot your Pi now.
- To connect to a wireless network, create another file on the card called wpa_supplicant.conf, which has the following inside:
Edit country=, ssid= and psk= with your information and save the file.
Code: Select all
ssid="Your network name/SSID"
psk="Your WPA/WPA2 security key"
- Safely eject the card from your PC and use it to boot the Pi.
If Raspbian finds an ssh file it will enable SSH and delete the file. If it finds a wpa_supplicant.conf file, it will move it to its correct location and connect to your wireless network. Give your Pi some time to boot and connect to your network (the first boot always takes a bit longer), then you should be able to SSH into the Pi and configure it how you like.
If you have a Zeroconf network service installed (iTunes or the Bonjour Printer service installs Zeroconf), you can SSH into firstname.lastname@example.org
(provided you don't have any other Pi computers on your network with the default hostname). Otherwise you can login to your router or use a network scanner app (like Fing for smartphones) to find your Pi's IP address.
If you have attempted this and failed, then pulled power to turn off the Pi, you should start over with a freshly imaged card. Improperly powering down the Pi can cause SSH key generation to fail, which will prevent SSH logins.
My password is the last 8 digits of Pi.