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


Zoran
 

Interesting... Here is what I have on Fedora32:

[root@fedora32-ssd system]# pwd
/lib/systemd/system
[root@fedora32-ssd system]# cat /lib/systemd/system/sshd.service
[Unit]
Description=OpenSSH server daemon
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target sshd-keygen.target
Wants=sshd-keygen.target

[Service]
Type=notify
EnvironmentFile=-/etc/sysconfig/sshd-permitrootlogin
EnvironmentFile=-/etc/sysconfig/sshd
ExecStart=/usr/sbin/sshd -D $OPTIONS $PERMITROOTLOGIN
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target

Seems that some leftovers from System V still reside in YOCTO... Correct???

Best Regards,
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.