Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub error - "ssh_exchange_identification: read: Connection reset by peer"

I just generated ssh keys in my Git Bash for an app I want to push to GitHub. I added the agent and agent identity, copied the key and created a new SSH Key in my GitHub account. When I try to run $ssh -T [email protected] I get an error message that says "ssh_exchange_identification: read: Connection reset by peer". I have seen this questioned posed before but not directly in relation to GitHub (correct me if I am wrong). I see my id_ras and id_rsa.pub files in my User\.ssh folder. What could be the problem causing this error message? Note: I am running this inside my office and wonder if this could be caused by the office network firewall?

like image 777
gwydion93 Avatar asked Oct 17 '17 20:10

gwydion93


People also ask

What is Connection closed by peer?

The error message "Connection reset by peer" appears, if the web services client was waiting for a SOAP response from the remote web services provider and the connection was closed prematurely. One of the most common causes for this error is a firewall in the middle closing the connection.

What is ssh_exchange_identification?

debug1: ssh_exchange_identification: Security Violation<br> Please logout and log back in<br> it means that our server has detected two different source addresses used in this connection request. This can happen if you are behind a proxy server or using a VPN.


1 Answers

First ssh -T [email protected] would not work
ssh -T [email protected] would

Second, if you have any proxy/firewall in your office, outgoing ssh connection should be blocked.
Using an https URL (with credential caching) is your best option.

like image 108
VonC Avatar answered Sep 20 '22 12:09

VonC