DocSledge
Posts: 1
Joined: Fri Aug 23, 2019 4:17 pm

RPI 4 SSH Error during headless installation

Fri Aug 23, 2019 4:28 pm

Hi there,
I hope, that I can get a solution of this little problem. I am working with the RPI for at least 4 years.
Yesterday I got my new Pi4. I created a new Raspbian Boot medium with the latest Buster Image. Also put a "ssh" file in the boot partition.
My Pi seems to boot and got an IP from my mikrotik router.
The Prob: I get an error: Connection refused and I am not able to access the Pi. Sadly I have no HDMI Cable due to the new Ports.
I never ever needed a cable, because all my Pi Projects and all my RPI3 worked that way of headless Installation.
After shutting down the Pi - the "ssh"-File has been deleted... Very strange because I thought that happens, after a SSH Connection has been succesfully established.
Does anybody has a Solutution?
Thank you in Advance.
Cheers,
Gerd

Andyroo
Posts: 4180
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: RPI 4 SSH Error during headless installation

Fri Aug 23, 2019 6:19 pm

The ssh file is deleted at boot time as the ssh is set to run so the file not being there is good news :D

Can you run

Code: Select all

ssh -v [email protected]<ip address>
and post the result here?

If you are running ptty then there is a way to set error logging to a file but I never use that program :roll:
Need Pi spray - these things are breeding in my house...

fulmar
Posts: 3
Joined: Fri Aug 23, 2019 12:03 am

Re: RPI 4 SSH Error during headless installation

Fri Aug 23, 2019 7:13 pm

Are you able to ping to the rpi and out to your LAN? Probably not the problem, but had something similar, and my issue was bad Mikrotik configuration.

User avatar
HawaiianPi
Posts: 4532
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: RPI 4 SSH Error during headless installation

Fri Aug 23, 2019 7:25 pm

Sounds like you may not be using the correct IP address? Do you have other Pi computers on the same network with the default hostname?

Are you using a wired (Ethernet) or wireless connection?

Other than the 'ssh' file, were there any other changes to the card before booting?

FYI, headless boot with Raspbian Buster Lite works fine with my 4B2 and 4B4.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
B.Goode
Posts: 8255
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: RPI 4 SSH Error during headless installation

Fri Aug 23, 2019 8:43 pm

After shutting down the Pi - the "ssh"-File has been deleted... Very strange because I thought that happens, after a SSH Connection has been succesfully established.



No, that's not quite true.


The relevant Raspberry Pi documentation says:
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.
Ref: https://www.raspberrypi.org/documentati ... /README.md


So the 'marker' file will be deleted when the SSH server (listener, or Daemon) is enabled. It doesn't depend on a subsequent connection being made to that server .

Return to “Troubleshooting”