Excessive delay at ssh connection to remote host
SCOTT FIELDS
Scott.Fields at kyndryl.com
Tue Oct 6 12:00:02 AEDT 2026
What was the delay you identified for this, since the attached log only shows a roughly 10 second delay from attempting public key to requesting passwd and getting it.
13:02:57: Connection established from 192.168.69.115, followed by key exchange, setup, and a none auth attempt.
13:02:57: The user attempts public key authentication (ssh-ed25519).
13:02:57: The server checks /home/sma-user1/.ssh/authorized_keys, determines the key is not allowed (Failed publickey...), and sends a failure response.
13:02:57 to 13:03:08: The Bottleneck. A noticeable silence in the logs lasting roughly 11 seconds (from 13:02:57 to 13:03:08).
13:03:08: The client finally sends a password authentication request (type 50).
This could be a reverse DNS lookup issue.
On the server you are trying to ssh into, can you lookup the source by both DNS name and IP address and they both resolve immediately.
The reverse address lookup is the most likely cause in this case.
It would be worth doing the same on you source client to ssh'ing from for the target servers DNS name and reverse IP lookup as well.
________________________________________
From: openssh-unix-dev <openssh-unix-dev-bounces+scott.fields=kyndryl.com at mindrot.org> on behalf of James Moe via openssh-unix-dev <openssh-unix-dev at mindrot.org>
Sent: Monday, October 5, 2026 7:36 PM
To: openssh-unix-dev at mindrot.org <openssh-unix-dev at mindrot.org>
Subject: [EXTERNAL] Re: Excessive delay at ssh connection to remote host
On 2026-10-04 12:59, James Moe via openssh-unix-dev wrote:
> I have already provided a log file using the above (only with -d -d). The issue
> for me was that there are no timestamps in the log and I could not parse where
> the delay(s) occurred.
>
/usr/sbin/sshd -p 2222 -e -d -d -d 2>&1 | ts | tee /tmp/sshd-2222.txt
Nothing happens for over 2 minutes. This does not appear to be a sshd problem,
although it may still be a configuration issue. The delay is only associated
with this one host.
Any ideas about what may be causing the delay?
----[ sshd log of remote host ]----
...bunch o' initialization...
Oct 05 13:00:30 debug2: fd 7 setting O_NONBLOCK
Oct 05 13:00:30 debug3: sock_set_v6only: set socket 7 IPV6_V6ONLY
Oct 05 13:00:30 debug1: Bind to port 2222 on ::.
Oct 05 13:00:30 Server listening on :: port 2222.
It is here that I started a connection at the local host at 13:00:41.
Oct 05 13:02:57 debug3: fd 8 is not O_NONBLOCK
Oct 05 13:02:57 debug1: Server will not fork when running in debugging mode.
Oct 05 13:02:57 debug1: rexec start in 8 out 8 newsock 8 config_s 9/10
Oct 05 13:02:57 debug3: send_rexec_state: entering fd = 9 config len 7143
Oct 05 13:02:57 debug3: send_rexec_state: done
Oct 05 13:02:57 debug3: recv_rexec_state: entering fd = 4
Oct 05 13:02:57 debug3: ssh_msg_recv entering
Connection establishes normally.
----[ end ]---
--
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
Think.
More information about the openssh-unix-dev
mailing list