Raspberry Pi Zero W: fast headless Wifi configuration with SSH

Yesterday I received a Raspberry Zero W, that for approximately $10 include Wifi and Bluetooth (byebye dongles) but no Ethernet port.

This post contains the instructions for configuring the Raspberry Pi Zero W so that he connects to the wifi network at the first startup of Linux, without wasting time (after that, you can log on via SSH).

Insert the SD in your Raspberry Pi Zero W, attach the power USB, connect your computer to the wifi, scan the network to find the raspberry IP address (i use lanscan on OSX) and you can connect via SSH (the default password is raspberry)

I had to do the following to get a super long psk code which worked for me when my plain text password was failing. Note, I had to enter this command on a Pi I had already set up in order to get the code.

$ wpa_passphrase MYSSID passphrase

Replace MYSSID with the name of the network you’re trying to connect to.