Intermittent SSH Connection Delays (~15-120 seconds) on Windows OpenSSH 10.0
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Lĩnh vực
- networking, operating-systems
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện độ trễ không liên tục trên các phiên bản Windows Server được liệt kê với OpenSSH 10.0 và ghi lại các dấu thời gian trong sshd.log và sshd-session.log xung quanh thời điểm tạo subprocess. So sánh các kết nối nhanh và các kết nối bị trễ, sau đó theo dõi đường dẫn khởi tạo tiến trình Windows để xác định nguyên nhân; công việc được xem là hoàn tất khi các kết nối luôn được thiết lập trong khoảng 1–2 giây như dự kiến.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
Environment:
- OpenSSH Version: 10.0.0.0 (Win32-OpenSSH-GitHub)
- Windows Version: Windows Server 2016 thru 2025
- Client: OpenSSH 8.9p1 (Ubuntu Linux)/OpenSSH Windows 9.5p2
- Authentication: ED25519 public key, local user account
Description:
SSH connections to a Windows OpenSSH 10.0 server experience intermittent delays of 15-120 seconds during the subprocess initialization phase. The issue occurs unpredictably—sometimes allowing 18+ consecutive fast connections before a pause occurs, other times pausing after just a few connections. System resources (CPU <10%, RAM ~2GB/4GB) remain stable throughout.
Symptoms:
- Connection delays occur between
sshd-session.exe -Rsubprocess spawn and actual connection handling - Delays range from 15-120 seconds, making automation and Ansible tasks timeout
- Pattern is inconsistent but reproducible (occurs in ~10% of connection attempts)
- No resource exhaustion detected; system remains responsive
- Issue persists across multiple test runs
Root Cause Analysis:
Server-side logs show the delay occurs during:
debug3: spawning "c:\\program files\\openssh/sshd-session.exe" -R as subprocess
[~34-47 second gap here]
debug1: Connection from X.X.X.X port XXXXX on X.X.X.X port 22
The gap occurs before the session subprocess even begins processing the SSH protocol, indicating a Windows process creation/initialization issue rather than network or authentication delays [2].
Log Evidence:
Server logs (sshd-session.log):
NNNN 2026-02-18 HH:MM:SS.123 debug3: spawning "c:\\program files\\openssh/sshd-auth.exe" -R as user
NNNN 2026-02-18 HH:MM:SS.124 debug2: Network child is on pid NNNN
NNNN 2026-02-18 HH:MM:SS.150 debug3: preauth child monitor started
NNNN 2026-02-18 HH:MM:SS.180 debug3: mm_request_receive: entering
[Process continues normally at this point]
Main process logs (sshd.log):
NNNN 2026-02-18 HH:MM:SS.692 debug3: spawning "c:\\program files\\openssh/sshd-session.exe" -R as subprocess
NNNN 2026-02-18 HH:MM:SS.755 debug2: server_accept_loop: child NNNN for connection received config
[~63 millisecond delay between spawn and handling]
Post-session cleanup shows potential lock contention:
NNNN 2026-02-18 HH:MM:SS.XXX debug1: user: clat-ansible: do_cleanup [postauth]
NNNN 2026-02-18 HH:MM:SS.XXX debug3: mm_request_receive: entering
NNNN 2026-02-18 HH:MM:SS.XXX debug3: mm_request_receive: monitor fd closed
NNNN 2026-02-18 HH:MM:SS.XXX debug1: mm_reap: preauth child exited with status 255
Questions for clarification:
- When did this issue first appear? This happens in both v9.2.0.0 and v10.0.0.0
- Is there a specific Windows configuration? There are no domain credentials only local accounts using public key authentication.
- Has there been any Windows-specific changes?: This effects hosts that have and have not had changes in the past 2 years. No noticeable correlation in configuration or OS. Client is both Ubuntu (most often from Ansible) as well as Windows 11 and Windows Server 2022.
Expected behavior
SSH connections should establish consistently within 1-2 seconds regardless of prior connection history.
Actual behavior
Inconsistently connecting between 500ms and 2 minutes.
Error details
No noticeable errors other than timeouts in some cases
Environment data
Name Value
---- -----
PSVersion 5.1.20348.4294
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.4294
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Have also tested with PowerShell Core:
Name Value
---- -----
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Microsoft Windows 10.0.20348
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
v10.0.0.0, but upgraded from v9.2.0.0 to test if latest version fixes this issue
Visuals
No response
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 8.3k
- Fork
- 820
- Merge trung bình
- 12 phút
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PowerShell/Win32-OpenSSH
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
PowerShell/Win32-OpenSSH#2458 · 1 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
PowerShell/Win32-OpenSSH#2462 · 1 bình luận · 1 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
PowerShell/Win32-OpenSSH#2460 · 1 reaction ·
-
User-defined environment variables referenced in the user PATH are not expanded in SSH sessions Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
PowerShell/Win32-OpenSSH#2456 · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
PowerShell/Win32-OpenSSH#2455 ·
Tất cả issue của PowerShell/Win32-OpenSSH
Issue tương tự
-
bug good first issue needs testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Nmap
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
community-scripts/ProxmoxVE#17471 · 2 bình luận ·
-
bug DEV: backend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
learningequality/kolibri#15331 ·
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100