Re: #yocto systemd not able to start sshd after a reboot #yocto


Khem Raj
 

On 9/21/20 5:17 AM, srijan.nandi@gmail.com wrote:
/Seems that some leftovers from System V still reside in YOCTO...
Correct???
Yocto project supports sysvinit as init system option as well so no there are no leftovers.

/
Not sure about that.
The problem I faced was because there was a sshd.socket that had the following line in it. The sshd.socket comes with openssh.
Conflicts=sshd.service
So I had two options. either to add the ExecStartPre in the sshd.service file or to remove the Conflicts line in sshd.socket.
I choose to remove the Conflicts line and add the following in the sshd.socket file.
After=network.target
Before=sshd.service
Usually you use socket activation for sshd then you would enable sshd.socket and not sshd.service, socket will be listening on incoming connections on ssh port ( 22 by defaault ) and launch sshd.service whenever there is incoming ssh connection request. I suggest you should perhaps follow this approach as well, its also efficient due to its on-demand launch nature.

Thanks and Regards,
-=Srijan Nandi

Join yocto@lists.yoctoproject.org to automatically receive all group messages.