欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

LInux系统SSH连接出错问题及解决方法

程序员文章站 2022-04-21 20:43:20
系统访问远程主机时可能出现这种情况">Linux系统访问远程主机时,可能出现这种情况: [kiosk@fundation20 ~]$ ssh root@172.25.20.1 -X @...
[kiosk@fundation20 ~]$ ssh root@172.25.20.1 -X
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
e6:08:b3:4c:c5:ed:f6:51:b0:68:aa:0a:2e:9a:02:28.
Please contact your system administrator.
Add correct host key in /home/kiosk/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/kiosk/.ssh/known_hosts:9
RSA host key for 172.25.20.1 has changed and you have requested strict checking.
Host key verification failed.

解决方法

[kiosk@fundation20 ~]$ rm -fr /home/kiosk/.ssh/known_hosts

再次连接

[kiosk@fundation20 ~]$ ssh root@172.25.20.1 -X
The authenticity of host '172.25.20.1 (172.25.20.1)' can't be established.
RSA key fingerprint is 97:cf:3b:f8:be:fc:2f:c1:ee:be:1b:ab:2f:fe:a7:ff.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.25.20.1' (RSA) to the list of known hosts.
root@172.25.20.1's password: 
Last login: Tue Jan 30 19:50:06 2018 from 172.25.20.250
[root@server1 ~]#