Excessive delay at ssh connection to remote host

Lars Noodén lars.nooden at gmx.com
Mon Oct 5 10:05:58 AEDT 2026


On 10/4/26 22:59, James Moe via openssh-unix-dev wrote:
> On 2026-10-03 21:21, Lars Noodén via openssh-unix-dev wrote:
> 
>> Leave off the -E or -e options then and the logging will go to the usual
>> place(s).  However, that will pollute your main log with a lot of noise.
>>    Thus the recommendation to log the separate instance of sshd
>> separately using -E.
>>
>> /usr/sbin/sshd -p 2222 -E /tmp/sshd.log -d -d -d
>   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

For 1-second granularity:

/usr/sbin/sshd -p 2222 -e -d -d -d 2>&1 | ts | tee /tmp/sshd.log

For microsecond granularity:

/usr/sbin/sshd -p 2222 -e -d -d -d 2>&1 \
| python -c 'import datetime; import sys; [print 
(datetime.datetime.now(), flush=True) for line in sys.stdin]' \
| tee /tmp/sshd.log

Maybe there is a better way.

/Lars


More information about the openssh-unix-dev mailing list