kex_exchange_identification: Connection closed by remote host
Connection closed by 140.82.121.3 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
It is suddenly found that git cannot operate, and an error is reported, as shown in the figure above.
Thought the SSH key failed?Check it. It’s corresponding.
Testing
$ ssh -T [email protected]
The result is still
Internet search method:
Test port 443 can be successful
$ ssh -T -p 443 [email protected]
Referring to the online method, the solution is as follows:
Locate git’s config file /etc/ssh/ssh_ Config and edit
$ vi /etc/ssh/ssh_ config
If you don’t have permission, use sudo
Add the following code at the end and save
Host github.com
User git
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
success!
Then you can operate git normally!
Read More:
- Push failed Unable to access ‘https://github.com/‘: Failed to connect to github.com port 443: Timed
- Problem solving: failed to connect to github.com port 443: Operation timed out(2020.06.04)
- pycharm Failed to connect to github.com port 443: Timed out
- ansible Q&A: Failed to connect to the host via ssh: ssh_exchange_identification and Authentication or per
- fatal: unable to access ‘https://github.com/xxx‘: Failed to connect to github.com
- JDBC connect to Sql Server to connect to the database–The TCP/IP connection to the host localhost, port 1433 has failed
- The solution to the problem that the virtual machine and the host SSH can’t connect on vmvare
- Failed connect to github.com:443 ; no error and the remote end hung up unexpectedly
- curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
- How to solve problems like curl: (7) failed to connect to raw.githubusercontent.com Port 443: problem with connection used
- Ubuntu20.04 installing RVM error curl: (7) failed to connect to raw.githubusercontent.com port 443: Operation timed
- LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
- macos LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
- OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
- Solve the MAC terminal download error curl: (7) failed to connect to raw.githubusercontent.com port 443: Connection refused
- Git command line configuration and configuration file to solve clone error libressl_ connect: SSL_ ERROR_ SYSCALL in connection to github. com:443
- Centos Failed to Modify the port of SSH: error: Bind to port 27615 on 0.0.0.0 failed: Permission denied.
- SSH appears warning: remote host identification has changed!
- ssh port forwarding
- [Git & GitHub] Solution: error: failed to push some refs to’https://github.com/xxxx.git’