Posts: 4
Joined: Wed Nov 06, 2019 5:02 am

PI4 Buster Full headless ssh file

Tue Dec 03, 2019 4:37 am


Installed 2019-09-26-raspbian-buster-full on a microsd using balenaEtcher-Portable-1.5.63
Used Win10 to create an empty ssh file in the boot drive/partition of the microsd
Could not connect to the pi with ssh. "Connection refused"
Verified the ssh file existed on the the microsd using 2 separate Win10 machines.
Still could not connect with ssh.
Connected kbd/mouse/monitor to the pi and it booted logged in to desktop.
Opened up the /boot from the pi, and the ssh file I created on Win10 did not appear.
Created the ssh file from the pi, rebooted, and then headless ssh worked.

Why would the ssh file created by the Win10 machine not appear when looking at the /boot from the pi?
It appears that the pi will remove the ssh file after successfully enabling ssh (?), but after booting with the ssh file created by Win10 (which didnt work), I looked at the microsd from a different Win10 machine and the ssh file was still present. The pi didnt see it?

I feel like I have done the headless ssh enable many times, so I dont know what I could be missing.
I did a 2019-09-26-raspbian-buster-lite just the other day using the same gear and it worked fine. Could it be a buster-full problem?

Thanks for any insights.

Posts: 28
Joined: Sun Feb 03, 2019 8:29 pm

Re: PI4 Buster Full headless ssh file

Tue Dec 03, 2019 4:51 am

Did you check that the configuration for ssh enabled was set before you created the ssh file directly from the pi desktop?
I suspect ssh was enabled after the boot and thus the file was removed by the boot process, meaning it was not necessary (but did no harm) to enter a new ssh file.
Then on the second boot it would have ssh enabled.

You can try this, by DISabling the ssh feature and writing a new ssh file to the root.
Then reboot and observe if you can ssh - or - you would have to do a second reboot - after the ssh file is automatically removed and the ssh feature is enabled.

Meaning: you would have to boot 2 times with ssh file written to the root from scratch, to be able to ssh your Pi4.

User avatar
Posts: 36524
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: PI4 Buster Full headless ssh file

Tue Dec 03, 2019 7:39 am

As soon as the process that activates ssh runs the /boot/ssh* file is deleted.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Troubleshooting”