ralfrottmann
Posts: 1
Joined: Thu Apr 06, 2017 10:56 pm

Headless install: Pi keeps refusing connection.

Thu Apr 06, 2017 11:03 pm

Here is what I've done:
- Downloaded Raspbian Jessie Lite Release 2017-03-02.
- Used Etcher on the Mac to burn the image to the SD card.
- Created an empty ssh file in /boot via touch /Volumes/boot/ssh and confirmed it was successfully created.
- Put the SD card into the Pi, hooked it up via Ethernet and plugged in USB power.

The Pi boots and grabs an IP address. I can ping it. However, when I try to ssh into it via ssh pi@192.x.x.x I get ssh: connect to host 192.x.x.x port 22: Connection refused.

When I remove the SD card and put it back into my MacBook, I do see that the ssh file has been removed, which to me confirms that the Pi did in fact "see" it on boot.

Why does the connection get refused? I do need to find a way for a completely headless setup. This is getting really tedious. Any help or advise is greatly appreciated.

User avatar
allfox
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: Headless install: Pi keeps refusing connection.

Fri Apr 07, 2017 7:26 am

Greetings.

I'm not sure I meet the same problem. Just my own story.

I have a Pi that when booted, can not connect via link local address, but would work with static address. It replys connection refused to link local address.

I read your situation is the DHCP address not working. So maybe it worth a try to the link local address, aka ssh pi@raspberrypi.local

I also find that it seems relate to system time. Wait for some time, it would fix itself. I dont know its the PC cache or the Pi NTP doing the trick.

Conect Pi to Internet, then be patient for 5 min, see if it fixed.

Martin Frezman
Posts: 1009
Joined: Mon Oct 31, 2016 10:05 am

Re: Headless install: Pi keeps refusing connection.

Fri Apr 07, 2017 7:34 am

The obvious answer is: Hook up a keyboard, mouse, and screen, and figure out what went wrong. Once you figure out which step didn't get done, then you'll know how to do it over "completely headless".
If this post appears in the wrong forums category, my apologies.

Return to “Troubleshooting”