Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2023 12:36:32 +0100
From:      Michael Gmelin <grembo@freebsd.org>
To:        Yuri <yuri@freebsd.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: sshd doesn't disconnect for 30+ minutes after the TCP connection is closed ungracefully
Message-ID:  <08DDB90C-5D30-40A3-86C0-87021959F04D@freebsd.org>
In-Reply-To: <baf5faa3-3c03-fb9e-4196-bd26c2fc622e@tsoft.com>
References:  <baf5faa3-3c03-fb9e-4196-bd26c2fc622e@tsoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help


> On 1. Mar 2023, at 11:35, Yuri <yuri@freebsd.org> wrote:
>=20
> =EF=BB=BFWindows system connects to FreeBSD through ssh and then this conn=
ection dies because of WiFi or VPN issues.
>=20
> FreeBSD still has the sshd process alive for this connection for 30+ minut=
es.
>=20
> TCP keepalive is enabled on the FreeBSD host:
>=20
> $ sysctl net.inet.tcp.always_keepalive
> net.inet.tcp.always_keepalive: 1
>=20
> Shouldn't TCP keepalive kill this sshd process after 3-4 minutes because t=
his connection isn't alive?
>=20

Keepalives start after net.inet.tcp.keepidle milliseconds (2h by default).

Cheers





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?08DDB90C-5D30-40A3-86C0-87021959F04D>