0001.ssh无密码登录,出现 ECDSA host key 与host ip 地址对应的key 不同

1.问题:

已经设置了ssh无密码登录,可在使用过程中,可能会出现如下问题:


tyltrinobugdeMacBook-Pro:~ tyltr$  ssh -p 26722 root@104.153.101.34 

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@    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:3dDIlwt1L3ACU88IqAjPCh0hFMpmiAg+3/qmdKBkVO0.

Please contact your system administrator.

Add correct host key in /Users/tyltr/.ssh/known_hosts to get rid of this message.

Offending ECDSA key in /Users/tyltr/.ssh/known_hosts:4

ECDSA host key for [104.153.101.34]:26722 has changed and you have requested strict checking.

Host key verification failed


2. 解决方案

注意上述问题中,红字的部分。表明 [104.153.101.34]:26722  ECDSA host key 出现问题,那么就重新去掉这个有问题的 key就行了。

注意:部分小伙伴的错误提醒中,并没有红字这句话,或者没有直接提示出时哪一个ip的ECDSA host key 出现问题,那怎么办?

好办!

直接查看 .ssh/known_hosts 文件

tyltrinobugdeMacBook-Pro:~ tyltr$ cat /Users/tyltr/.ssh/known_hosts | grep 104.153.101.34

[104.153.101.34]:26722 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEa6LASIRwK5dournV59XKYjAQzn9Q1xqyEawg/So7YlW5kQ3MBJJXQfEqstD1x87yNcMDSttQI4PVUirzuSwLQ=

 

使用命令: ssh-keygen -R  [104.153.101.34]:26722 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值