sshd should kill all ssh sessions when exiting to avoid hanging terminal sessions Reproducible: Always Steps to Reproduce: 1.log in with ssh 2.reboot system 3.ssh connection is "dead" Expected Results: when the system reboots ssh sessions should get killed i allready found a fix for this just replace the stop function in the sshd initscript with this: stop() { if [ "${RC_CMD}" = "restart" ] ; then checkconfig || return 1 fi ebegin "Stopping ${SVCNAME}" if yesno $RC_REBOOT; then #rebooting start-stop-daemon --stop -n "${SSHD_BINARY}" --quiet else start-stop-daemon --stop --exec "${SSHD_BINARY}" \ --pidfile "${SSHD_PIDFILE}" --quiet fi eend $? } as openrc introduced RC_REBOOT some time ago and its also used in the kexec init script it should be fine to use it here too
have fun doing an "/etc/init.d/sshd restart" then ... Did you try to discuss this with the OpenSSH-devs (upstream)?
*** This bug has been marked as a duplicate of bug 367553 ***
you are right, but why should i discuss upstream? isn't this distro related? debian/ubuntu handles this case and shuts down all ssh connections when the pc reboots