openssh 7.6 and 7.7 on Oracle Linux 7 (compiled from source) doesn't start correctly with systemd

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Latest Oracle Linux (7.5) and openssh 7.4 is bundled as an rpm.  this runs
fine.  if I download openssh 7.6 or 7.7, compile it with the flags
--with-pam and --with-pid-dir=/var/run and install it to /usr/local, modify
the sshd.service file to point to /usr/local/sbin/sshd, the start hangs.
The sshd.service files looks like this:

[Unit]
Description=OpenSSH server daemon
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target sshd-keygen.service
Wants=sshd-keygen.service

[Service]
Type=notify
PIDFile=/var/run/sshd.pid
EnvironmentFile=/etc/sysconfig/sshd
ExecStart=/usr/local/sbin/sshd $OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target

OPTIONS get's picked up from /etc/sysconfig/sshd and has "-D -4" as the
options.  systemctl start sshd hangs and it seems like openssh isn't
notifying systemd that it's started.  For awhile, it seemed like sshd
wasn't writing it's pid file but it seems like having changed the flags to
--with-pid-dir has it writing it's pid file.  The funny thing is that sshd
*does* get started but systemd never recognizes it so ends up killing it
and restarting it over and over and over.  running the sshd under strace
from the command line of course works fine, sshd starts, you can login,
etc., so it's some interaction with systemd that I need to get figured out.

Let me know what more I can add to this that would help please.

---


Regards,

Kevin Martin
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux