Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git SSH issue - "Software caused connection abort" kex and banner exchange error

This question has been asked before and I seem to have same issue as here but no definitive answer https://stackoverflow.com/questions/73920741/git-bash-error-kex-exchange-identification

I've been following a guide I've used before and I know it is accurate to set up SSH key. Repo definitely exists, I've made sure public has been copied over to github account settings correctly but error showing as when I try to test key or push to repo:

kex_exchange_identification: read: Software caused connection abort
banner exchange: Connection to [ip] port 22: Software caused connection abort

I've checked github systems status and reports, it seems everything their end is operational. I've had Git set up on this machine before and pushed to multiple repos but I have to reinstall because I got my OS reinstalled.

debug is below

$ ssh [email protected] -vT
OpenSSH_9.2p1, OpenSSL 1.1.1t  7 Feb 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [140.82.121.4] port 22.
debug1: Connection established.
debug1: identity file /c/Users/x/.ssh/id_rsa type -1
debug1: identity file /c/Users/x/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/x/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/x/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/x/.ssh/id_ecdsa_sk type -1
debug1: identity file /c/Users/x/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /c/Users/x/.ssh/id_ed25519 type 3
debug1: identity file /c/Users/x/.ssh/id_ed25519-cert type -1
debug1: identity file /c/Users/x/.ssh/id_ed25519_sk type -1
debug1: identity file /c/Users/x/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /c/Users/x/.ssh/id_xmss type -1
debug1: identity file /c/Users/x/.ssh/id_xmss-cert type -1
debug1: identity file /c/Users/x/.ssh/id_dsa type -1
debug1: identity file /c/Users/x/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.2
kex_exchange_identification: read: Software caused connection abort
banner exchange: Connection to 140.82.121.4 port 22: Software caused connection abort

Thanks for reading :)

like image 799
sw016428 Avatar asked Jan 16 '26 21:01

sw016428


2 Answers

"Software caused connection abort" means exactly that: you have some software on your system that caused your connection to be aborted. That could be a firewall, an antivirus, a proxy, monitoring software, or any similar software on your machine. This isn't a problem with GitHub and there's nothing GitHub can do to solve it.

The Git developers recommend using only the default antivirus and firewall on Windows (that's Windows Defender and Windows Firewall) and not using any other proxy. If you have such software on your computer (other than the default antivirus and firewall), you should uninstall it and reboot, and the problem will likely go away.

Note that we don't know for certain what software is doing this, only that it's some software on your machine.

like image 62
bk2204 Avatar answered Jan 19 '26 20:01

bk2204


I've recently encountered the same problem due to my company's highly rigid network policies.

Yet, when I switched from the SSH to the HTTPS address, the problem went away.

I also had to use the Windows certificate mechanism git config --global http.sslbackend schannel (as recommended here), but that's about it.

like image 31
mgmussi Avatar answered Jan 19 '26 19:01

mgmussi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!