public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Peer Dietzmann <dietzmann@brecht-schule.hamburg>
To: Michael Tremer <michael.tremer@ipfire.org>
Cc: development@lists.ipfire.org,
	Peer Dietzmann <dietzmann@brecht-schule.hamburg>
Subject: Re: Re: sshd kill all sessions on deamon stop
Date: Sun, 24 Aug 2025 19:59:03 +0200	[thread overview]
Message-ID: <0c7d2437-8253-44ef-a5e9-b02800db8e87@brecht-schule.hamburg> (raw)
In-Reply-To: <BF5FDE85-736D-40F9-9597-AFAA65617D70@ipfire.org>

Hi Michael,

On 24/08/2025 14:55, Michael Tremer wrote:
> Hello Peer,
>
> Thank you for your email.
>
> I understand what you want to achieve here, but I don’t quite unterstand why. Why would those sessions need to be closed?
As those sessions aren't restored after a reboot, these sessions are 
then useless and have to be closed anyway. I think this could be done 
automatically by IPFire.
>
> Your patch would have some other consequences which I don’t 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?

I understand your explanation, I was unsure if my patch would also 
affect the updater, but the solution you supposed would also fix the 
problem I tried to solve with my patch. Could you add this to the 
corresponding script?

Thanks in advance!

Best regards,

Peer

>
> -Michael
>
>> On 24 Aug 2025, at 07:25, Peer Dietzmann <dietzmann@brecht-schule.hamburg> wrote:
>>
>> Hi All,
>>
>> 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.
>>
>> Best regards,
>>
>> Peer
>>
>>
>> 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
>>           ;;
>>
>>       reload)
>>
>>
-- 
Mit freundlichem Gruß
Peer Dietzmann

Brecht-IT  | Administration und Support

Brecht-Schule Hamburg GmbH
Norderstrasse 163-165 | 20097 Hamburg
Tel.: +49 40 21 11 12 - 37 | Fax: +49 40 21 11 12 - 20
E-Mail: dietzmann@brecht-schule.hamburg | www.brecht-schule.hamburg

Diese Email enthält ggfs. vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese Email irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Email.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Email ist nicht gestattet.



      reply	other threads:[~2025-08-24 17:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-24  6:25 Peer Dietzmann
2025-08-24 12:55 ` Michael Tremer
2025-08-24 17:59   ` Peer Dietzmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0c7d2437-8253-44ef-a5e9-b02800db8e87@brecht-schule.hamburg \
    --to=dietzmann@brecht-schule.hamburg \
    --cc=development@lists.ipfire.org \
    --cc=michael.tremer@ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox