How to setup headless wifi and ssh on raspberry pi for people who’ve done it before

This is the first paragraph that readers will most likely skip, because they just want the bullet points where to put the files and what to put into them. For those people, these instructions are extra short.

After setting up rasbian or ubuntu or whatever there are two partitions. Ignore the rootfs partition. Focus on the boot partition,

  • create a new file called ssh in the root directory of the boot partition (touch ssh).
    Leave the file empty.
  • create another file in the root folder called wpa_supplicant.conf
    Copy the following content into the file and edit it to match your WiFi settings.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevupdate_config=1
country=DE # Your 2-digit country code
network={
    ssid="my-wifi-name"
    psk="my-wifi-password"
    key_mgmt=WPA-PSK
}

Check the new device from your router to find it’s IP address. Pretending the ip is 123.45.67.89, run this linux-command from a computer in the same network to access your raspberry pi.

ssh pi@123.45.67.89

The default password is raspberry