-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connection reset by server after SSH2_MSG_KEXINIT sent #1027
Comments
Are you running Sshd debug mode as system? If not please see the release notes |
Yes, I did run it as system
|
@asterikx As a workaround, skip Please regnerate |
Thanks @manojampalam. This indeed gives me more information on what went wrong, but still I can't figure out the causing issue. Server-side output:
|
In this case, sshd (privilege separation account) token couldn't be generated. I would double check that you are running as SYSTEM. If yes, please check Troubleshooting wiki and get debug3 traces from sshd service |
I was, checked it by running But anyways, I solved my issues, by removing For future reference, here all the commands I run for removing the current installation and reinstalling (assuming the downloaded archive is located at
After that the permissions on the
@manojampalam Maybe update the installation instructions? Previously I removed all permissions except for |
Just wasted 2 hours on this. |
Same problem. Emphasis on this issue in the installation docs recommended. |
Sorry about that. I've added a reference to this thread in the troubleshooting page. https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps |
Having just lost almost 6 hours over two days on this issue (and having overlooked the small note on the troubleshooting page), I'm wondering if there is more to be done than highlight in the Troubleshooting-Steps. Ideally this problem could be detected and fixed automatically via the Install script or FixHostFilePermissions.ps1 script? Likewise, some indication of the problem in debug-level logging would be helpful. In my case, the DEBUG3 logs showed no indication of anything unusual when sshd was run as a service but connections would immediately reset. Likewise, the problem wouldn't manifest when running sshd directly in debug mode. The crucial difference? My original script expanded the archive and moved the "OpenSSH-Win64" directory that had been at the root of the archive into "Program Files". This results in entirely different permissions than when I expand the archive into a destination directory in "Program Files" and then move the contents of the "OpenSSH-Win64" subdirectory up to the parent. |
Thank you!!!!!!! I should have ran Told me the problem right there. |
So I'm having this issue ... except a bit different.
Any ideas? I've been banging my head for more than 6 hours and I have no idea what's going on. I tried what asterikx mentioned ( #1027 (comment) ) but no luck. EDIT:
Essentially what this means is the folder needs to be owned by
|
@RT-Tap you're a star! This saved me hours of investigation. |
In my case, I had to disable in the sshd_config AuthorizedKeysFile PROGRAMDATA/ssh/administrators_authorized_keysIt was throwing an error that I discovered using sshd -ddd |
I recently ran into this issue with Windows 2019/2022 domain servers that were firewalled off from the domain controllers and found that you need to enable the dynamic windows ports (49152-65535) between the domain servers and the domain controllers or you get the same failure described in this issue. |
This worked for me on standard Windows 11 Pro install |
@asterikx 's solution (#1027 (comment)) worked for me, I ran
|
Just chiming in; this is still an issue in 2024 and I also wasted many days til I found this thread. Probably should put this up on the README in a FAQ list. In my case (Win Server 2016), I similarly had an issue when unpacking to a non |
"OpenSSH for Windows" version
v1.0.0.0-Beta
Server OperatingSystem
Windows 10 Pro
Client OperatingSystem
MacOS High Sierra 10.13.2
What is failing
The connection is reset by the server after
SSH2_MSG_KEXINIT sent
by the client. I needed RSA support, that's why I switched from the built-in version (which was working) tov1.0.0.0-Beta
. I followed the release notes and installation instructions.Expected output
An established connection/SSH shell.
Actual output
Client-side:
Server-side:
The text was updated successfully, but these errors were encountered: