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


Zoran
 

There was a sshd.socket file in /lib/systemd/system which had the following line in it.
Interesting... Pushed/forced me to think.

There is no formal dependency between sshd.service and sshd.socket!

[vuser@fedora32-ssd systemd]$ systemctl list-dependencies sshd.service
| grep ssh
sshd.service
● ├─sshd-keygen.target
● │ ├─sshd-keygen@...
● │ ├─sshd-keygen@...
● │ └─sshd-keygen@...
[vuser@fedora32-ssd systemd]$ systemctl list-dependencies sshd.service
| grep socket
● ├─lvm2-lvmetad.socket
● ├─lvm2-lvmpolld.socket
[vuser@fedora32-ssd systemd]$ systemctl list-dependencies sshd.socket
| grep sshd
sshd.socket

Strange... Isn't it?!

Zoran
_______

On Sat, Sep 19, 2020 at 3:37 PM <srijan.nandi@...> wrote:

Hello All,

I finally got it to work!!!

There was a sshd.socket file in /lib/systemd/system which had the following line in it.

Conflicts=sshd.service

I remove it and added the following two lines:

After=network.target
Before=sshd.service

And that did the trick. Now sshd service starts on every boot.

Thanks,
-=Srijan Nandi

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