The authenticity of host 'localhost (::1)' can't be established.

Error:

[centos@s200 hadoop]$ ssh localhost 
The authenticity of host ‘localhost (::1)’ can’t be established. 
ECDSA key fingerprint is b7:a7:1d:80:34:67:c6:1e:a2:ac:8e:67:a5:38:38:d0. 
Are you sure you want to continue connecting (yes/no)? 1 
Please type ‘yes’ or ‘no’: yes 
Warning: Permanently added ‘localhost’ (ECDSA) to the list of known hosts. 
Write failed: Broken pipe

Fix it:

ssh -o StrictHostKeyChecking=no 192.168.xxx.xxx

方法二
一个彻底去掉这个提示的方法是,修改/etc/ssh/ssh_config文件(或$HOME/.ssh/config)中的配置,添加如下两行配置:

StrictHostKeyChecking no
UserKnownHostsFile /dev/null

修改好配置后,重新启动sshd服务即可。

centos7重启ssh服务命令为systemctl restart sshd.service



  • 1
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值