Christoph Anton Mitterer <cales...@scientia.net> writes:

> 1) I recently completely reworked my sshd_config, and since then, when I
> shutdown the server where sshd runs upon, I do get logouts on the
> clients that are connected to it.
> The strange thing though is, that the way the client is logged out
> differs from time to time.
> Sometimes it says:
> Terminated
> Connection to myhost closed by remote host.
> Connection to myhost closed.

> Sometimes just:
> Connection to myhost closed by remote host.
> Connection to myhost closed.

> So it still seems that something is a bit fishy there.

I believe the former happens when process shutdown kills your shell before
your sshd, and the latter happens when the processes get killed in the
opposite order.  (bash prints "Terminated" when it catches a signal and
exits.)  Usually all running processes are killed "at the same time"
during shutdown, so the order is not deterministic.  I think this is
purely cosmetic.

> I just cannot reproduce right now whether this was actually caused by
> systemd on the client (i.e. networking being stopped, before the ssh
> process was terminated, and thus no clean disconnection happening) or
> whether it's some issue in ssh itself.

It doesn't really matter, since the client can go away without sending a
FIN in a ton of other ways.  If you care, you should set ClientAlive* or
TCPKeepAlive, like you have.  I've seen this behavior for years, with or
without systemd.

-- 
Russ Allbery (r...@debian.org)               <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to