Unable to negotiate with 10.11.81 port 8235: no matching host key type found. Their offer: ssh-rsa

Reinstall the system on the mac computer, go to the official website to download the latest git installation, next all the way down, open bash and set up the old way to generate the public key

git config --global user.name "yourname"

git config --global user.email "[email protected]"

ssh-keygen -t rsa -C "[email protected]"

Add the public key to Baidu Cloud. When cloning the code, it cannot be pulled down and an error is reported.

Check that you have developer rights. Resetting the public key and then adding it won't work. Go online to find a way.

reason:

The reason for this situation is that the new ssh client does not support the ssh-rsa algorithm.

Solution:

To modify the local configuration and use the ssh-rsa algorithm again,

1. Create a config file in the .ssh directory under the current user directory (config has no suffix)

cd .ssh/

2. Use vim command or use notepad to open 

3. Copy and paste the following content into the config file and save it 

Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa 

Reference link: Remember to report an error using git and solve the problem Unable to negotiate with **** port 22: no matching host key type found. Their offer: ssh-rsa

Guess you like

Origin blog.csdn.net/chengzhenjia/article/details/132236608