Skip to content

Instantly share code, notes, and snippets.

@caike
Last active December 28, 2017 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caike/6167053b35652781123a4e1cc6d7913d to your computer and use it in GitHub Desktop.
Save caike/6167053b35652781123a4e1cc6d7913d to your computer and use it in GitHub Desktop.
Setting up ssh and wifi on first Raspbian Strech Lite boot

Raspbian Strech Lite Quick setup

In order to enable SSH and wifi on first boot we need to add two files to the root folder on the SD card before inserting it into the raspberry.

First, create an empty file named ssh. Then, create a second file called wpa_supplicant.conf. The contents of this file should be

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

followed by the result of the command wpa_passphrase [WIFI-NAME] [PASSWORD].

For example:

$ cat wpa_supplicant.conf
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
        ssid="yourwifi"
        psk=5b203d29asd5asd9caf383e6499d34291a25b462e83c2f1584d70101ff56c96
}

Now eject the SD card from your computer, insert it into the raspberry and 💥!

@caike
Copy link
Author

caike commented Oct 9, 2017

In case you don't have access to a Linux machine in order to run wpa_passphrase, see https://github.com/caike/supplicant-psk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment