当前位置:网站首页>Shell | ssh失败原因及解决方法不完全总结

Shell | ssh失败原因及解决方法不完全总结

2022-07-23 13:46:00 MissMango0820

本文总结在 Linux 系统上 ssh 可能失败的原因及其解决方法的不完全总结。

Updated: 2022 / 7 / 19

Shell | ssh失败原因及解决方法不完全总结


ssh_host file

问题描述

输入 ssh [email protected] 时,报出错误 1,如下所示:

[[email protected] ~]$ ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
6e:45:f9:a8:af:38:3d:a1:a5:c7:76:1d:02:f8:77:00.
Please contact your system administrator.
Add correct host key in /home/hostname /.ssh/known_hosts to get rid of this message.
Offending RSA key in /var/lib/sss/pubconf/known_hosts:4
RSA host key for pong has changed and you have requested strict checking.
Host key verification failed.

解决方法

ssh-keygen -R <host>
比如,
ssh-keygen -R 192.168.3.10

从 ```ssh-Keygen` 的手册来看,

-R hostname Removes all keys belonging to hostname from a known_hosts file. This option is useful to delete hashed hosts (see the -H option above).

参考链接


  1. ssh remote host identification has changed

原网站

版权声明
本文为[MissMango0820]所创,转载请带上原文链接,感谢
https://blog.csdn.net/MissMango0820/article/details/125866651