1

I am new to working with the Raspberry Pi Zero. The first time I installed the Raspbian image into the memory card for a headless setup I created a file named just ssh and then I was able to ssh into it using putty on port 22, host name = [email protected].

Due to some software issue I did a fresh flashing of the Raspbian OS into the memory card and just as first time I created a ssh file but I am not able to SSH into it. I get error "unable to open connection to raspberrypi.local Host does not exist".

Also when I connect the Raspberry Pi Zero to Windows should it be recognized as a USB Ethernet device? I don't know if it was getting recognized the first time but this second time it does not.

1
  • Is this a Pi Zero or Zero W? You mentioned in a comment below Zero W but your post doesn't mention that; it'd be helpful to specify exactly which one you have.
    – Aurora0001
    Commented Apr 20, 2018 at 15:34

1 Answer 1

2

RPi Zero has no built-in Ethernet, so it's possible that Raspbian has not recognized the external USB to Ethernet adapter (i.e. missing drivers) or that it goes in conflict with another device and your router can't assign an IP address.

My advise is to login to your router and look at DHCP leases table for a device named raspberrypi.

Of course, the easiest way is to connect a display to the RPi's HDMI port or if you have a USB to TTL Serial cable (i.e. Adafruit 954) you can examine the Console messages.


According to Raspberry site to enable SSH you need to put a blank file named "ssh" in the boot partition (on Windows you should see it as a separate drive i.e. "boot (E:)") of the SD card:

For headless setup, SSH can be enabled by placing a file named ssh, without any extension, onto the boot partition of the SD card from another computer. When the Pi boots, it looks for the ssh file. If it is found, SSH is enabled and the file is deleted. The content of the file does not matter; it could contain text, or nothing at all.

If you have loaded Raspbian onto a blank SD card, you will have two partitions. The first one, which is the smaller one, is the boot partition. Place the file into this one.

You need to connect the Ethernet cable to your router and then find the RPi's IP address (raspberrypi.local may not work). The easiest way is look at router's DHCP leases table.

5
  • I was able to SSH into raspberry without setting it up with the router earlier. My laptop running itself was able to assign an IP to it earlier but now the USB connected to Rpi zero w itself is not getting recognized after I did the same OS install like earlier. Commented Apr 20, 2018 at 15:18
  • 1
    I see, but raspberrypi.local address may not work for several reasons (i.e. zeroconf may be unavailable or your it's in conflict with another device). So the fastest way to find the RPi IP address is to look in your router's DHCP leases. If that's not possible you can ping all devices in your network i.e. ping 192.168.1.255 and then use arp -a. On Windows follwow this stackoverflow.com/a/13713380/9675415
    – fiery
    Commented Apr 20, 2018 at 16:03
  • Earlier when it run the first time, when I did ipconfig in windows machine that the rpi zero was connected, the rpi device was identified as a USB ethernet device and it had an assigned IP address but now it does not recognize the device... Commented Apr 20, 2018 at 20:11
  • Now IP address does get assigned by the router and I am able to ping to it but cant ssh into it, Commented Apr 20, 2018 at 20:58
  • I checked the IP table and I am now able to SSH into it. Commented Apr 20, 2018 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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