As we know, when the ssh connection is gone, the bash will receive a SIGHUP, and forward this signal to all its children.
I wonder who is the original sender of this SIGHUP, is it ssh client, ssh server, OS or something else?
I read the code of openssh-portabal, and I found only here uses the SIGHUP: https://github.com/openssh/openssh-portable/blob/master/sshconnect.c#L285
And the caller seems to be client: https://github.com/openssh/openssh-portable/blob/master/ssh.c#L1533
I didn't find any sender code in the server-side sshd.c
Does this mean that the sender is client? In this case, the SIGHUP will not be received by the server if the connection was interrupted. I'm not pretty sure about this, but in my experience this doesn't seem to be true.
So I'm curious about who is supposed to be the original sender. Is there a standard for this?