How to maintain a persistent SSH connection?
martin f krafft
madduck at madduck.net
Thu Nov 16 01:04:51 AEDT 2017
also sprach martin f krafft <madduck at madduck.net> [2017-11-15 14:08 +0100]:
> The sshd(8) process stays around for an unspecified time (>90min)
> after the connection went down.
For the record, I've attached strace and tcpdump to the various
processes to see what happens server-side after the connection goes
down, but there is *nothing*:
1. strace on the privileged sshd process has it sitting at
restart_syscall(<… resuming interrupted poll …>) = 1
until at some indefinite point, the unprivileged child dies, at
which point it tears down after catching SIGCHLD.
2. strace on the unprivileged sshd process, the one that bound the
remote port just stays at
select(10, [3 6 8 9], [], NULL, NULL…
indefinitely.
Those FDs are (3) main SSH connection, (6) a pipe, (8) IPv6
listening socket for port 2217, (9) IPv4 listening socket for
port 2217.
3. tcpdump on the main SSH connection has not seen a single packet
in the last 20 minutes. Curiously, netstat/lsof seem to think
that the connection is ESTABLISHED.
This isn't good, but maybe it's also not a problem of SSH, but the
OS/kernel (4.9.0).
Best regards,
--
@martinkrafft | http://madduck.net/ | http://two.sentenc.es/
"in just seven days, i can make you a man!"
-- the rocky horror picture show
spamtraps: madduck.bogus at madduck.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: digital_signature_gpg.asc
Type: application/pgp-signature
Size: 1118 bytes
Desc: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20171115/32e31873/attachment.asc>
More information about the openssh-unix-dev
mailing list