PowerShell / PowerShell/Win32-OpenSSH
sshd: error: kex_exchange_identification: write: Connection reset
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
Troubleshooting steps
https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps
Terminal issue? please go through wiki
https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH
Please answer the following
"OpenSSH for Windows" version
7.7 and 8.1
Server OperatingSystem
((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion\" -Name ProductName).ProductName)
Client OperatingSystem
Windows 10 and Windows Server 2016
What is failing
It was working fine up until recently and we made no changes.It stoped working at once on 3 servers.Every possible solution from google was tested and nothing helped.After the monthly reboot all 3 servers started working fine and were working for two weeks then it happened again.SSH not accessible for 2 weeks and I removed and installed 8.6 on one server which did nothing to solve it and then we had another scheduled reboot and it started working only on 1 server with 8.6 installed and the other two still can not connect.When connecting it hangs for a while on line debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7 then it continues and sends the packet but the response is never recieved.
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
Entire log is bellow.
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug3: Failed to open file:C:/Users/XXXX/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolving "Server1" port 2222
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to Server1 [xxx.xx.xx.xxx] port 2222.
debug1: Connection established.
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_rsa error:2
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_rsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\XXXX/.ssh/id_rsa type -1
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_rsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\XXXX/.ssh/id_rsa-cert type -1
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_dsa error:2
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_dsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\XXXX/.ssh/id_dsa type -1
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_dsa-cert error:2
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_dsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\XXXX/.ssh/id_dsa-cert type -1
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_ecdsa error:2
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_ecdsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\XXXX/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_ecdsa-cert error:2
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_ecdsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\XXXX/.ssh/id_ecdsa-cert type -1
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_ed25519 error:2
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_ed25519.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\XXXX/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_ed25519-cert error:2
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_ed25519-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\XXXX/.ssh/id_ed25519-cert type -1
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_xmss error:2
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_xmss.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\XXXX/.ssh/id_xmss type -1
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_xmss-cert error:2
debug3: Failed to open file:C:/Users/XXXX/.ssh/id_xmss-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\XXXX/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_for_Windows_8.1
debug1: match: OpenSSH_for_Windows_8.1 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to Server1:2222 as 'operator_XXXX'
debug3: put_host_port: [Server1]:2222
debug3: hostkeys_foreach: reading file "C:\Users\XXXX/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file C:\Users\XXXX/.ssh/known_hosts:11
debug3: load_hostkeys: loaded 1 keys from [Server1]:2222
debug3: Failed to open file:C:/Users/XXXX/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: recv - from CB ERROR:10054, io:00000250D47DD710
Connection reset by xxx.xx.xx.xx port 2222
Error on server side from event viewer is "sshd: error: kex_exchange_identification: write: Connection reset"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the linked Troubleshooting Steps and TTY/PTY support wiki pages first, then compare the client debug log with the server Event Viewer error and the reported OpenSSH versions. The issue is complete when the intermittent connection reset has a confirmed, reproducible cause and an actionable resolution.
Written by the indexing model from the issue text.
Assessment
- Domain
- networking, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100