git bash WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
时间: 2023-10-31 07:59:34 浏览: 105
When you encounter the "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" error in Git Bash, it means that the remote host you are trying to connect to has a different identification than what was previously saved in your SSH known_hosts file. This warning is a security measure to protect against potential man-in-the-middle attacks.
To resolve this issue, you have a few options:
1. Verify the remote host's identification manually:
- Check the authenticity of the host by contacting the system administrator or provider.
- Compare the remote host's identification (fingerprint) with the one stored in your known_hosts file.
- If they match, you can remove the old entry from the known_hosts file and try connecting again.
2. Update the SSH known_hosts file automatically:
- Open Git Bash and run the following command to remove the outdated entry from the known_hosts file:
```
ssh-keygen -R <hostname>
```
Replace `<hostname>` with the actual hostname or IP address of the remote host.
- Try connecting to the remote host again, and Git Bash should prompt you to add the new host identification to the known_hosts file. Confirm by typing "yes" and pressing Enter.
Remember, it is important to ensure that you are connecting to the correct remote host before proceeding. If you are unsure or suspect any security risks, it is advisable to contact your system administrator for assistance.
阅读全文