当前位置:网站首页>解决服务器重装无法通过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命令登录即可。
边栏推荐
- R语言ggplot2可视化:使用ggplot2可视化散点图、使用scale_color_viridis_d函数指定数据点的配色方案
- Cache avalanche and cache penetration solutions
- Flutter 从零开始 005 图片及Icon
- 又被 Kotlin 语法糖坑惨的一天
- Let's talk about how to do hardware compatibility testing and quickly migrate to openeuler?
- Object mapping - mapping Mapster
- MySQL索引和优化的理解学习
- Hannaiping of Qilin software: the construction of Digital China needs its own open source root community
- Map集合
- 1254. 统计封闭岛屿的数目
猜你喜欢

Embedded sig | multi OS hybrid deployment framework

线下门店为什么要做新零售?

Embedded SIG | 多 OS 混合部署框架

光谱共焦位移传感器的原理是什么?能应用那些领域?

智慧法院新征程,无纸化办公,护航智慧法院绿色庭审

AGCO AI frontier promotion (6.30)

这些电影中的科幻构想,已经用AI实现了

What is the function of LED backlight?

How difficult is data governance and data innovation?

Our company has used this set of general solutions for 7 years, and has opened up dozens of systems, a stable batch!
随机推荐
Quel est le rôle du rétroéclairage LED?
ClipboardJS——开发学习总结1
Multiparty Cardinality Testing for Threshold Private Set-2021:解读
MATLAB中polarplot函数使用
edusoho企培版纯内网部署教程(解决播放器,上传,后台卡顿问题)
Serial communication interface 8250
wallys/IPQ8074a/2x(4 × 4 or 8 × 8) 11AX MU-MIMO DUAL CONCURRENT EMBEDDEDBOARD
Object mapping - mapping Mapster
会议预告 | 华为 2012 实验室全球软件技术峰会-欧洲分会场
网络营销之四大误解
STM32 porting the fish component of RT thread Standard Edition
ModelAtrs声音检测,基于声学特征的异响检测
安装onnx很慢,使用清华镜像
R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram and use scale_ x_ The log10 function configures the value range of the X axis to be logarithmic coordinates
shell第一个命令结果传入第二个命令删除
Shutter start from zero 006 radio switches and checkboxes
Learn how to implement distributed locks in redis - my own understanding
It is said that with this, the boss opened the test overnight
DMA控制器8237A
对象映射 - Mapping.Mapster