关于known_hosts文件的疑惑

来源:2-5 Git常用命令

穆宁

2020-12-18

为什么报@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the RSA key sent by the remote host is SHA256:xnm0q+BqBcS4V4hbst3zE9U7AabUGi5RquzA5kP/bfk. Please contact your system administrator. Add correct host key in /c/Users/August/.ssh/known_hosts to get rid of this message. Offending RSA key in /c/Users/August/.ssh/known_hosts:1 RSA host key for [git.imooc.com]:80 has changed and you have requested strict checking. Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
后删除.ssh目录下的known_hosts文件就可以解决呢?这个多余的文件是怎么产生的呢?

写回答

1回答

河畔一角

2020-12-18

know_hosts不是多余文件,是做了公钥认证以后,访问服务器的时候自动生成的,表示你电脑跟服务器之间可以链接,删除以后会从新在生成一个。

0
1
穆宁
非常感谢!
2020-12-18
共1条回复

Vue全家桶实战 从零独立开发企业级电商系统

Vue全家桶构建企业级电商系统,真实服务端数据对接,高实用性

2560 学习 · 1309 问题

查看课程