Comments
Patch
new file mode 100644
@@ -0,0 +1,11 @@
+[Unit]
+Conflicts=sshd.service
+
+[Socket]
+ExecStartPre=/bin/mkdir -p /var/run/sshd
+ListenStream=22
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
+Also=sshdgenkeys.service
new file mode 100644
@@ -0,0 +1,9 @@
+[Unit]
+Description=OpenSSH Per-Connection Daemon
+After=sshdgenkeys.service
+
+[Service]
+ExecStart=-/usr/sbin/sshd -i
+ExecReload=/bin/kill -HUP $MAINPID
+StandardInput=socket
+StandardError=syslog
new file mode 100644
@@ -0,0 +1,10 @@
+[Unit]
+Description=SSH Key Generation
+
+[Service]
+ExecStart=/usr/bin/ssh-keygen -A
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
new file mode 100644
@@ -0,0 +1,22 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+PRINC := "${@int(PRINC) + 1}"
+
+SYSTEMD_PACKAGES = "openssh-sshd-systemd"
+SYSTEMD_SERVICE = "sshd.socket"
+
+inherit systemd
+
+SRC_URI += "file://sshd.socket file://sshd@.service file://sshdgenkeys.service"
+
+do_install_append() {
+ install -d ${D}${base_libdir}/systemd/system
+ install -m 644 ${WORKDIR}/sshd.socket ${D}${base_libdir}/systemd/system
+ install -m 644 ${WORKDIR}/sshd@.service ${D}${base_libdir}/systemd/system
+ install -m 644 ${WORKDIR}/sshdgenkeys.service ${D}${base_libdir}/systemd/system
+}
+
+PACKAGES =+ "openssh-sshd-systemd"
+
+FILES_openssh-sshd-systemd += "${base_libdir}/systemd"
+RDEPENDS_openssh-sshd-systemd += "openssh-sshd"