All of lore.kernel.org
 help / color / mirror / Atom feed
* #yocto systemd not able to start sshd after a reboot
@ 2020-09-18 15:29 srijan.nandi
  2020-09-18 16:37 ` [yocto] " Khem Raj
  2020-09-27 10:00 ` [yocto] " Zoran
  0 siblings, 2 replies; 11+ messages in thread
From: srijan.nandi @ 2020-09-18 15:29 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1603 bytes --]

I am facing a peculiar problem with openssh. I have built openssh_8.0p1on zeus.

The sshd.service file is as follows:
[Unit]
Description=OpenSSH server daemon
Documentation=man:sshd(8) man:sshd_config(5)
After=sshdgenkeys.service
Wants=sshdgenkeys.service

[Service]
Type=simple
PIDFile=/var/run/sshd.pid
EnvironmentFile=-/etc/default/sshd
ExecStart=/usr/sbin/sshd -D $OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill $MAINPID
PermissionsStartOnly=true
KillMode=process
Restart=on-failure
StandardError=syslog

[Install]
WantedBy=multi-user.target

It starts without issues, if i do a systemctl start sshd.service. If I do a test of the config file it does not come up with any errors:

genericx86-64:~$ sudo /usr/sbin/sshd -t
genericx86-64:~$

Problem:
If I reboot the server, sshd does not start. There is no error on syslog. I have enabled debug logging, still no logs in syslog.

# Logging
SyslogFacility DAEMON
LogLevel DEBUG3

Even systemctl is-enabled sshd shows as enabled.

After a reboot, if I do a systemctl status sshd it shows:
Loaded: loaded  (/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: inactive (dead)

If I manually run systemctl start sshd.service, everything works perfectly well without issues. sshd start on 0.0.0.0:2224 and I am able to ssh in as well.

It's just that systemctl is not able to start sshd after a reboot and there is no error that i can find or debug. Absolutely run out of ideas to resolve this. Any help will be greatly appreciated.

Thanks and Regards,
-=Srijan Nandi

[-- Attachment #2: Type: text/html, Size: 2020 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-09-27 10:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-18 15:29 #yocto systemd not able to start sshd after a reboot srijan.nandi
2020-09-18 16:37 ` [yocto] " Khem Raj
2020-09-18 18:04   ` srijan.nandi
2020-09-19  3:10     ` [yocto] " Zoran
2020-09-19 13:12       ` srijan.nandi
2020-09-19 13:49         ` [yocto] " Zoran
2020-09-21 12:17           ` srijan.nandi
2020-09-22  6:49             ` [yocto] " Khem Raj
2020-09-21 13:22         ` Zoran
2020-09-21 17:09           ` srijan.nandi
2020-09-27 10:00 ` [yocto] " Zoran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.