It’s been a while since I did a fresh install of Raspbian AND needing WiFi immediately. My previous setups involved flashing the MicroSD card and connecting it via Ethernet to my test network. However, today I needed to setup a fresh Raspbian with WiFi and SSH out of the box. A few minutes of looking at Stack Exchange (a real God send) and Raspberry Pi forums I found a neat way to do it. Below are the steps to get both working on first install.

The following steps works on both the Raspberry Pi 3 and Raspberry Pi 2 with a WiFi dongle.

After you have written the MicroSD card with the latest version of Rasbian Jessie, plug the MicroSD card back in again so the boot partition is visible. Click on it so you can see the contents because you’ll need to make some changes here.

boot folder to add the following files

WiFi Auto Connect

  • Create a new file in the boot directory called wpa_supplicant.conf and enter your WiFi details to it.
  • This file will be copied over to /etc/wpa_supplicant/ on boot up.
  • Replace YOUR_NETWORK_NAME with your wireless SSID information and YOUR_PASSWORD with your wireless password.
  • It’s assumed that you’re using WPA for your wireless security here.

Enable SSH

  • Create an empty file in the boot directory called ssh.
  • If the ssh file is found during boot up, the SSH service will be set to start up automatically.

Unmount the boot directory, unplug the MicroSD card, plug the MicroSD card to your brand spanking new Raspberry Pi and enjoy the fruitiness!

Now the cool thing about Raspbian Jessie is that it has mDNS service already configured ad running out of the box. So once you’ve performed the above tasks, you’ll be able to connect to your new Raspberry Pi without needing to know it’s IP. The default mDNS name of the Raspberry Pi is raspberrypi.local so once the Raspberry Pi is up (it takes less than 30 seconds to boot up but I usually wait up to a minute just to be safe). You can connect to your new Raspberry Pi using SSH with the command ssh pi@raspberrypi.local. The default password for a new install of Raspbian is raspberry. PLEASE CHANGE THIS DEFAULT PASSWORD ONCE YOU LOG IN.

You can change the settings and parameters of your shiny new Raspbian Jessie from here. Cheers!!