Ssh – “ssh_exchange_identification: read: Connection reset by peer” error trying to connect to OpenSSH on Windows machine

sshwindows-server-2008

I'm trying to set up an SSH server on my Windows2k8 server. I used the instructions found here. Here's the verbose output:

steves-air:~ steve$ ssh steve@mydomain.ca -v
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to mydomain.ca port 22.
debug1: Connection established.
debug1: identity file /Users/steve/.ssh/id_rsa type -1
debug1: identity file /Users/steve/.ssh/id_rsa-cert type -1
debug1: identity file /Users/steve/.ssh/id_dsa type -1
debug1: identity file /Users/steve/.ssh/id_dsa-cert type -1
debug1: identity file /Users/steve/.ssh/id_ecdsa type -1
debug1: identity file /Users/steve/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/steve/.ssh/id_ed25519 type -1
debug1: identity file /Users/steve/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/steve/.ssh/id_xmss type -1
debug1: identity file /Users/steve/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
ssh_exchange_identification: read: Connection reset by peer

So far I'm able to get a network connection, indicating that it's not a firewall problem. As a test, I also tried running sshd under cygwin. I was able to get a terminal prompt with that. I'd prefer to use OpenSSH though, since I want to get it working with powershell.

I tried setting the logging level to DEBUG, but i'm not getting any other troubleshooting info from there.

I'd appreciate any guidance.

*edit: Just realized i should mention. I tried putting a hosts.allow file in the %programdata%/ssh directory. That didn't help and I'm not sure if its applicable in this case.

*edit2: I tried running sshd in interactive mode per the troubleshooting steps from here. Windows came up with an appcrash when i tried to connect. Here's the output before it crashed:

PS C:\Program Files\OpenSSH> .\sshd.exe -d
debug1: sshd version OpenSSH_for_Windows_7.9, LibreSSL 2.6.5
debug1: private host key #0: ssh-rsa SHA256:XXX
debug1: private host key #1: ecdsa-sha2-nistp256 SHA256:XXX
debug1: private host key #2: ssh-ed25519 SHA256:XXX
debug1: rexec_argv[0]='C:\\Program Files\\OpenSSH\\sshd.exe'
debug1: rexec_argv[1]='-d'
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Server will not fork when running in debugging mode.
Connection from 192.168.1.39 port 51410 on 192.168.1.3 port 22
debug1: Client protocol version 2.0; client software version 
OpenSSH_7.9
debug1: match: OpenSSH_7.9 pat OpenSSH* compat 0x04000000
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.9
debug1: monitor_read_log: child log fd closed
debug1: do_cleanup
debug1: Killing privsep child 10684

Best Answer

It looks like the answer is "you can't get there from here." I found a closed issue on the git which says that w2k8 standard is not supported. I tried installing on a different server that has 2k8R2 on it and that worked easily.