歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux教程

SSH連接主機時出現連接不上的問題

今天想連接一台虛擬機來做實驗,輸入命令: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 AAAAB3NzaC1yc2EAAAABIwAAAQEAsrkXrOJ7YGOmCO8FWJtbPiU2ezrGcrX8+Drhad4IwebBXxnzu8pA36ph8641P1wZ1Pn+0MQyN5OURNvAFEyKWbYuFOMwFjuAlmWTW6jZPXDbkqautYCyJB1VyMaR1RgN0NuerB1VYP78hhODFVbKDJIm9R5A/ZJ5DTDVqpf6sO/9i2xP++RZRaOrnuZAYH8HJ7j6aBp6p7u4asT/CNgUi/KZTgZAXLk9kIiFxGUvhhKgjDJ7+man4mI+Z5n7awq80NLRV8Dc6gtkKahi+1vs28QxtZntcsHHGTXZdrnrhoVnXHM7Dtk/Ch0RUpSiEYWRknmeWcofrVEXYofX9HxBUw==
Copyright © Linux教程網 All Rights Reserved