bibucket ssh_exchange_identification: read: Connection reset by peer

匆匆过客 提交于 2019-12-03 08:14:06

As a helpful annotation, I had this case in a shared hosting environment, specifically GoDaddy, and the reason It gave me this error:

ssh_exchange_identification: read: Connection reset by peer

Solution: my local machine's ip had been blocked by GoDaddy, so I had to contact their support, send them a screenshot of the error output from running:

ssh -v user@domain

, and also provide them with my ip. They noticed my ip had been in fact blocked, removed it, and problem solved.

ssh_exchange_identification: read: Connection reset by peer

"Connection reset by peer" means the TCP connection was "abnormally closed" from the remote (server) side. "ssh_exchange_identification" means that it's happening during a phase where the client and server exchange software version strings. This happens before the client and server exchange host keys or try to authenticate. In other words, the remote end of the connection is dropping before any kind of key exchange or authentication has taken place.

An abnormal close (connection reset) typically indicates that the server process exited without closing the connection, or it crashed, or that something like a firewall or load balancer is interfering with the connection. Normally I'd suggest to troubleshoot this on the server. But given this is bitbucket, it's probably safe to start with the assumption that their servers are working correctly. The likely alternative is that your traffic is going through a stateful firewall, or a load balancer, or a similar device within your network, and it's forcing the TCP stream closed for some reason.

I see you're trying to run SSH on port 443, probably following these instructions. Maybe your network engineers have blocked port 22 to the Internet? Maybe they're also doing packet inspection on port 443, and they're blocking traffic which doesn't look like HTTPS (HTTP over SSL).

I've seen this happen when I tried to pull updates on 20 or so projects, via a script, one immediately after another. I suspect I ran into some kind of limit. Adding a 'sleep 10' after each pull seems to have solved the problem.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!