Connection reset by ::1 port 22 (Windows 10 + PowerShell/cmd + OpenSSH)


I’m a host Windows 10 (version 20H2, build 19042.746), with WSL2 installed (like here:

After I installed the OpenSSH (like here: and, with these commands in PowerShell as admin:

I checked that the Windows Firewall includes service OpenSSH as an active and open Inbound Rule.

I checked with telnet too:

Until here seems all is ok!

Now the problem happens, running the command also in PowerShell (or in cmd):

Did anyone have the same problem (running in: Windows 10 + PowerShell/cmd + OpenSSH)?

Does anyone know why this problem happened?

Does anyone know how to solve this problem?


============= MORE INFOS =============

Follow another command to debug:

The __PROGRAMDATA__ seems to refer to Windows environment variable %PROGRAMDATA%, that point to C:\ProgramData.

Follow the content from sshd config:


I was experiencing same issue and fixed. Need to move extracted Open-SSH folder to Program Files and it works properly.


Connection reset by ::1 port 22 (Windows 10 + PowerShell/cmd + OpenSSH) by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply