From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4c8v6H1KZjz2xWb for ; Sun, 24 Aug 2025 12:55:19 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4c8v6C43YVz2xHm for ; Sun, 24 Aug 2025 12:55:15 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4c8v6B5JGVzYn; Sun, 24 Aug 2025 12:55:14 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1756040114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CaN+KlwuuLqCJBj6AV219HjrjSu3MqPfwXZpOUxb8bk=; b=fYdbj7DNXByroaKigBMidcSECJJm8VvSyhqWWkV/T7jKnomPOz1qaVZAsIhtMRXoTxKizQ FF2U2nV/ik7R7hDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1756040114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CaN+KlwuuLqCJBj6AV219HjrjSu3MqPfwXZpOUxb8bk=; b=qxG86skgfrJraXJN/cKTLGaN0zKxNB5XVlM4qwqf8JG77G50dyEwEeyPNAZWQJA4L2aqey iZuWuFz7ItkbnloTKWquKiGKwnX7EJnd1okc0hYTJAFbHzvAig+LQEGu9XMYh1x/WFRWUG PbrkVG6UnPR9OXUmyRkuZ6tuTR6leOF+UakWqA4mAVXE6ntBCwAizZsCGuvG7laWSOunYj vM67hGisJcikEo70zLK0sdeua88x9QBz9JIhXLuS9NDrhWUIMKy52mmxxi8VkRYqPmfBYo Vizjt4W9OSg4rIwGU8iPdkQ181YxMatzDNYQ5w9Ep3uD1PiBeOXiVaBoaXFDQg== Content-Type: text/plain; charset=utf-8 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: Mime-Version: 1.0 Subject: Re: sshd kill all sessions on deamon stop From: Michael Tremer In-Reply-To: <6d9b9a50-4479-422f-a370-540a59fa6959@brecht-schule.hamburg> Date: Sun, 24 Aug 2025 13:55:14 +0100 Cc: development@lists.ipfire.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <6d9b9a50-4479-422f-a370-540a59fa6959@brecht-schule.hamburg> To: Peer Dietzmann Hello Peer, Thank you for your email. I understand what you want to achieve here, but I don=E2=80=99t quite = unterstand why. Why would those sessions need to be closed? Your patch would have some other consequences which I don=E2=80=99t = think you intend. For example, if someone would install an update using = a SSH console and if that update upgrades OpenSSH and restarts it abort = the update. The process would terminate the updater and you would be = left with an incomplete update. I suppose what we could think about is to move terminating the SSH = daemon before the network is being shut down. Would that fix your = problem? -Michael > On 24 Aug 2025, at 07:25, Peer Dietzmann = wrote: >=20 > Hi All, >=20 > I discovered, that while rebooting an IPFire instance via SSH my = terminal keeps stuck after the broadcast message because IPFire isn't = closing all active connection correctly. As it is annoying especially = when using SSH in SSH connections because all connections have to be = reopened manually, I thought of adding just one line to the init-script = that closes all running sessions. >=20 > Best regards, >=20 > Peer >=20 >=20 > diff --git a/src/initscripts/system/sshd b/src/initscripts/system/sshd > index e5a9931af..e69904c61 100644 > --- a/src/initscripts/system/sshd > +++ b/src/initscripts/system/sshd > @@ -50,6 +50,7 @@ case "$1" in > stop) > boot_mesg "Stopping SSH Server..." > killproc -p "/var/run/sshd.pid" /usr/sbin/sshd || true > + killall sshd-session > ;; >=20 > reload) >=20 >=20