I have issues running sshd on a new windows 11 install. Get-service shows both sshd and ssh-agent running. Defender firewall is turned off. I generated keys with: ssh-keygen -t rsa -b 4096.
The error is:
kex_exchange_identification: Connection closed by remote host
Connection closed by 127.0.0.1 port 22
Isn't something badly screwed up if an ssh to localhost fails?
-vvv output follows.
OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
debug3: Failed to open file:C:/Users/jeff/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 127.0.0.1 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> 'C:\\Users\\jeff/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> 'C:\\Users\\jeff/.ssh/known_hosts2'
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug3: ssh_connect_direct: entering
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\jeff/.ssh/id_rsa type 0
debug3: Failed to open file:C:/Users/jeff/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_rsa-cert.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_rsa-cert error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_rsa-cert type -1
debug3: Failed to open file:C:/Users/jeff/.ssh/id_dsa error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_dsa.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_dsa error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_dsa type -1
debug3: Failed to open file:C:/Users/jeff/.ssh/id_dsa-cert error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_dsa-cert.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_dsa-cert error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_dsa-cert type -1
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ecdsa error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ecdsa.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_ecdsa error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ecdsa-cert error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ecdsa-cert.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_ecdsa-cert error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_ecdsa-cert type -1
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ecdsa_sk error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ecdsa_sk.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_ecdsa_sk error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_ecdsa_sk type -1
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ecdsa_sk-cert error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ecdsa_sk-cert.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_ecdsa_sk-cert error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_ecdsa_sk-cert type -1
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ed25519 error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ed25519.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_ed25519 error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ed25519-cert error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ed25519-cert.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_ed25519-cert error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_ed25519-cert type -1
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ed25519_sk error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ed25519_sk.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_ed25519_sk error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_ed25519_sk type -1
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ed25519_sk-cert error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_ed25519_sk-cert.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_ed25519_sk-cert error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_ed25519_sk-cert type -1
debug3: Failed to open file:C:/Users/jeff/.ssh/id_xmss error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_xmss.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_xmss error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_xmss type -1
debug3: Failed to open file:C:/Users/jeff/.ssh/id_xmss-cert error:2
debug3: Failed to open file:C:/Users/jeff/.ssh/id_xmss-cert.pub error:2
debug3: failed to open file:C:/Users/jeff/.ssh/id_xmss-cert error:2
debug1: identity file C:\\Users\\jeff/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.6
kex_exchange_identification: Connection closed by remote host
Connection closed by 127.0.0.1 port 22