1

This similar question has a lot of answers, none of which works anymore. Given that is already a little old, I'm asking the same quesion, for the current distribution of raspian (jessie 2017-04-10).

LGenzelis
  • 141
  • 1
  • 5

2 Answers2

5

On startup, Raspbian checks the contents of the boot directory for specific files:

  • If it detects a file called wpa_supplicant.conf, Raspbian will copy the file into /etc/wpa_supplicant, replacing any existing wpa_supplicant.conf file that may be there. The file in the boot directory is then removed.

  • If an empty file named ssh is detected, Raspbian will adjust its settings to accept SSH connections. The ssh file is then deleted.

Milliways
  • 62,573
  • 32
  • 113
  • 225
3

Firstly, plug the sd card into a computer. Then, there are basically three things that you probably want to do:

  1. In order to connect to a wifi network, edit /etc/wpa_supplicant/wpa_supplicant.conf and add the following lines:

    network={
        ssid="my-network-name"
        psk="my-network-pass"
        key_mgmt=WPA-PSK
    }
    
  2. In order to enable ssh (disabled by default in jessie 2017-04-10), create an empty file simply named ssh in /boot/.

  3. Finally, plug the card into your raspberry and, from a computer that is also connected to the same wifi network, do:

    ssh pi@raspberrypi.local

(instead of raspberrypi.local, you can write the ip address of the pi, but you need to know it somehow -e.g., by looking at your router clients list-).

LGenzelis
  • 141
  • 1
  • 5