今天想连接一台虚拟机来做实验,输入命令:ssh 192.168.1.101时出现下面的问题
[root@root ~]# ssh 192.168.1.101
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
02:03:df:90:b1:3a:4d:be:b8:f2:83:dc:9f:0e:df:8d.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:2
RSA host key for 192.168.1.101 has changed and you have requested strict checking.
Host key verification failed.
在网上查了一下发现是因为以前另一台主机使用过这个IP地址,生成的rsa与本主机不同,所以不能连接,所以就需要把与这个IP地址有关的注册信息删除掉,连接时会重新生成,就可以连接了,即删除掉如下内容
192.168.1.101 ssh-rsa