I've installed Raspbian Stretch Lite (June 2018) to a Raspberry Pi 3B+ and am trying to connect to it via ssh. Pi and my macbook are directly connected to the same network switch and my wifi is off to be sure I'm on the same network. LEDs on switch are flashing for both devices. Pi is not visible on the network though.

ping raspberrypi

Pings a device outside my local network.

nmap -sn 192.168.1.*

Returns 0 active hosts.

Adding ssh file to the boot dir of Pi SD card didn't help either.

My aim was to ssh into it without configuring anything from inside the Pi beforehand, but at this point I don't know what I'm missing. Any pointers appreciated.

  • have you determined the pi's ip address? – Mohammad Ali Jul 22 '18 at 20:04

You need to use raspberrypi.local on Mac.

Whether ping will work depends on the settings of your network.

See How to set up networking/WiFi


To bring up a Raspberry pi headless is fairly easy, even on WiFi.

You first put Raspian on your SD drive. I use etcher from my Linux laptop. This creates too partitions. You need to use a Linux system because under Windows only the boot partition can be seen because Windows doesn't know about the ext filesystems. You can, however, edit the files of the boot partition from windows, because it's a basic FAT16 (I think) partition.

  1. touch ssh: In the boot partition you need to create an empty file called "ssh". From Linux you can just use the "touch" command to create the file or you can just edit the file and save it without any characters.
  2. Create a working wpa_supplicant.conf file at /etc/wpa_supplicant/wpa_supplicant.conf. I got the file I use from a Raspberry Pi that I brought up with a keyboard and monitor. I just use the "vi" editor, but you can use whatever editor that you like.
  3. Boot the new Raspberry Pi.
  4. Find out the ip-address I do this typically by using my router's web interface. While I'm working with this pi I reserve the address given by the router. Since I know which addresses are already reserved, the new address is the new Raspberry Pi.
  5. Optionally I bring up my name server on my NAS. It's not difficult to use, and I then can refer to this computer by a name rather than number.
  6. raspi-config Ssh into your new Pi and run sudo raspi-config. Change the default password and whatever else you need to change. I always change the locale and often the keyboard layout. I also go through the interfacing options (I2C, SPI, serial port) and make them work right.

That's it.

I have heard that step #2 can be done by placing the wpa_supplicant.conf file in the boot partition. I've never had good luck doing that. I'm not saying it won't work. I'll even try it again on my next Pi system build. Maybe I'll get it right this time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.