Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #248842
| From | Vincent Lefevre <vincent@vinc17.net> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: OpenSSH: cause of random kex_exchange_identification errors? |
| Date | 2022-06-07 18:00 +0200 |
| Message-ID | <EvJMB-3egZ-3@gated-at.bofh.it> (permalink) |
| References | <DMp7j-7gJ-5@gated-at.bofh.it> <DNAWJ-17a-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2022-02-05 18:39:27 -0300, Henrique de Moraes Holschuh wrote:
> If it is sshd, ensure it is actually logging all you need, and carefully
> study the logs.
Nothing interesting in the logs, according to the admins of the server.
> If nothing helps, packet-dump both sides (client and server) and find
> out what sent the TCP RST, as that might give you clues for the "why".
> A middlebox might be doing it...
I eventually did a packet capture on the client side as I was able to
reproduce the problem. When it occurs, I get the following sequence:
Client → Server: [SYN] Seq=0
Server → Client: [SYN, ACK] Seq=0
Client → Server: [ACK] Seq=1
Server → Client: [FIN, ACK] Seq=1
Client → Server: Client: Protocol (SSH-2.0-OpenSSH_9.0p1 Debian-1)
Server → Client: [RST] Seq=2
Client → Server: [FIN, ACK] Seq=33
Server → Client: [RST] Seq=2
So the issue comes from the server, which sends [FIN, ACK] to terminate
the connection. In OpenSSH's sshd.c, this could be due to
if (unset_nonblock(*newsock) == -1 ||
drop_connection(*newsock, startups) ||
pipe(startup_p) == -1) {
close(*newsock);
continue;
}
At least 2 kinds of errors are not logged:
* In unset_nonblock(), a "fcntl(fd, F_SETFL, val) == -1" condition.
* the "pipe(startup_p) == -1" condition.
I'm not sure about drop_connection(), which is related to MaxStartups.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
OpenSSH: cause of random kex_exchange_identification errors? Vincent Lefevre <vincent@vinc17.net> - 2022-02-02 15:50 +0100
Re: OpenSSH: cause of random kex_exchange_identification errors? Hans <hans.ullrich@loop.de> - 2022-02-02 16:20 +0100
Re: OpenSSH: cause of random kex_exchange_identification errors? Vincent Lefevre <vincent@vinc17.net> - 2022-02-02 16:30 +0100
Re: OpenSSH: cause of random kex_exchange_identification errors? Bijan Soleymani <bijan@psq.com> - 2022-02-02 17:50 +0100
Re: OpenSSH: cause of random kex_exchange_identification errors? David Wright <deblis@lionunicorn.co.uk> - 2022-02-02 18:00 +0100
Re: OpenSSH: cause of random kex_exchange_identification errors? gene heskett <gheskett@shentel.net> - 2022-02-02 20:30 +0100
Re: OpenSSH: cause of random kex_exchange_identification errors? Greg Wooledge <greg@wooledge.org> - 2022-02-02 20:30 +0100
Reusing ssh keys on a new installation, was Re: OpenSSH: cause of random kex_exchange_identification errors? David Wright <deblis@lionunicorn.co.uk> - 2022-02-02 22:00 +0100
Re: OpenSSH: cause of random kex_exchange_identification errors? Vincent Lefevre <vincent@vinc17.net> - 2022-02-03 04:20 +0100
Re: OpenSSH: cause of random kex_exchange_identification errors? Henrique de Moraes Holschuh <hmh@debian.org> - 2022-02-05 22:40 +0100
Re: OpenSSH: cause of random kex_exchange_identification errors? Vincent Lefevre <vincent@vinc17.net> - 2022-02-08 11:20 +0100
Re: OpenSSH: cause of random kex_exchange_identification errors? Vincent Lefevre <vincent@vinc17.net> - 2022-06-07 18:00 +0200
Re: OpenSSH: cause of random kex_exchange_identification errors? Tim Woodall <debianuser@woodall.me.uk> - 2022-06-07 18:20 +0200
Re: OpenSSH: cause of random kex_exchange_identification errors? Vincent Lefevre <vincent@vinc17.net> - 2022-06-14 13:00 +0200
Re: OpenSSH: cause of random kex_exchange_identification errors? Tim Woodall <debianuser@woodall.me.uk> - 2022-06-14 20:20 +0200
Re: OpenSSH: cause of random kex_exchange_identification errors? Vincent Lefevre <vincent@vinc17.net> - 2022-06-15 03:50 +0200
Re: OpenSSH: cause of random kex_exchange_identification errors? Vincent Lefevre <vincent@vinc17.net> - 2022-06-15 15:20 +0200
Re: OpenSSH: cause of random kex_exchange_identification errors? Vincent Lefevre <vincent@vinc17.net> - 2022-06-15 16:00 +0200
csiph-web