当前位置:网站首页>解决服务器重装无法通过ssh连接的问题
解决服务器重装无法通过ssh连接的问题
2022-06-30 11:56:00 【爱叨叨的程序狗】
出现问题的原因
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ECDSA key sent by the remote host is
SHA256:+U+xy3dOfsLZ4KWbCUQvfajA//gL/FIYxaVPFcbkSQU.
Please contact your system administrator.
Add correct host key in /Users/liu_pc/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/liu_pc/.ssh/known_hosts:1
ECDSA host key for ip
has changed and you have requested strict checking.
Host key verification failed.
当我们Linux服务器选择重装系统后,再次使用ssh [email protected]
在命令行登录服务器时,会有如上文报错,纠其原因就是我们命令行所在的电脑在第一次连接成功服务器时,会记录一个ip+RSA的秘钥,由于服务器重装,Linux服务器的RSA公钥改变,那么相同的ip两者的公钥无法对起来,所以会出现该问题。
解决问题的办法
编辑Mac系统用户文件下的known_hosts
文件。由于个人用户名称不一致,命令中请自行更改。
vi /Users/liu_pc/.ssh/known_hosts
正常情况下会有ip + rsa公钥的文本,在vi下使用插入模式删除对应ip+rsa公钥的文本即可。
使用:wq保存文件。
然后再使用ssh命令登录即可。
边栏推荐
- Typescript readonlyarray (read only array type) details
- [revisiting the classic C language] ~x,%c,%d,%x, etc. in C language, the role of the address character in C language, and the consortium in C language
- Our company has used this set of general solutions for 7 years, and has opened up dozens of systems, a stable batch!
- Another miserable day by kotlin grammar
- [cf] 803 div2 A. XOR Mixup
- 【云原生 | Kubernetes篇】深入了解Deployment(八)
- ClipboardJS——开发学习总结1
- 光谱共焦位移传感器的原理是什么?能应用那些领域?
- 聊聊怎么做硬件兼容性检测,快速迁移到openEuler?
- c# 怎样能写个sql的解析器
猜你喜欢
随机推荐
If it is not listed again, Kuangshi technology will not be able to endure
time 函数和 clock_gettime()函数的区别
HMS core audio editing service 3D audio technology helps create an immersive auditory feast
R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram, and_ Set the alpha parameter in the point parameter to specify the transparency level of data points (points transparent
Set集合
[cf] 803 div2 B. Rising Sand
The sci-fi ideas in these movies have been realized by AI
In depth analysis of Apache bookkeeper series: Part 4 - back pressure
移除无效的括号[用数组模拟栈]
R语言ggplot2可视化:使用ggplot2可视化散点图、aes函数中的colour参数指定不同分组的数据点使用不同的颜色显示
[revisiting the classic C language] ~x,%c,%d,%x, etc. in C language, the role of the address character in C language, and the consortium in C language
AGCO AI frontier promotion (6.30)
200. 岛屿数量
3D视觉检测在生产流水的应用有哪些
MySQL 表的内连和外连
网络营销之四大误解
Beego development blog system learning (II)
1175. 质数排列 : 乘法原理运用题
R语言ggplot2可视化:使用ggplot2可视化散点图、使用scale_x_log10函数配置X轴的数值范围为对数坐标
Flutter 从零开始 007 输入框