rpi-img-builder icon indicating copy to clipboard operation
rpi-img-builder copied to clipboard

ssh file disappears after first boot

Open sgallou opened this issue 6 years ago • 2 comments

Hi,

I tried to enable ssh by default from a custom plugin, so I added this in my postinst script :

touch /boot/ssh

But after write image on SDCard, the file does not exist in the boot partition.

If I create it manually, it will be erased at first Pi start. I need to recreate it a second time to make SSH work.

What I'm doing wrong ? Is there another mean to enable SSH ?

Thanks, sgallou

sgallou avatar Jun 14 '18 21:06 sgallou

the pi need to boot twice for ssh to work, and it should do it on it's own, first boot creates the keys, keys aren't created cause every device needs unique keys so they can not be part of the image, once they are created the pi should reboot, and ssh should work. I have no idea what /boot/ssh does?

TheSin- avatar Jun 14 '18 23:06 TheSin-

Adding a /boot/ssh empty file enable SSH on headless RaspberryPi (see "3. Enable SSH on a headless Raspberry Pi" on this page). Should SSH work without adding this file ?

I let enough time (I hope) for RaspberryPi to make all its initialization, more than 10 minutes. Must I reboot manually to pass the second boot ?

sgallou avatar Jun 15 '18 07:06 sgallou