首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >对于ssh命令行工具,为什么`StrictHostKeyChecking=no`无效?

对于ssh命令行工具,为什么`StrictHostKeyChecking=no`无效?
EN

Ask Ubuntu用户
提问于 2023-04-05 05:48:43
回答 1查看 130关注 0票数 0

以下是执行过程:

代码语言:javascript
复制
$ ssh -o StrictHostKeyChecking=no root@10.1.1.1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:2ypJ7ea5D0iqFy5PzHVgHV7p6jX5ONSTGXZGf9KqF6A.
Please contact your system administrator.
Add correct host key in /home/peng/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/peng/.ssh/known_hosts:3
  remove with:
  ssh-keygen -f "/home/peng/.ssh/known_hosts" -R "10.1.1.1"
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
UpdateHostkeys is disabled because the host key is not trusted.
root@10.1.1.1: Permission denied (publickey,password,keyboard-interactive).

为什么ssh无视我的选择?

EN

回答 1

Ask Ubuntu用户

发布于 2023-04-10 22:02:38

如果仔细观察输出,主机键不匹配不会停止连接。但是,由于可能的中间人攻击,有些身份验证类型会被禁用,登录失败(root@10.1.1.1: Permission denied ...)。

通常,您将看到StrictHostKeyChecking=no与类似于UserKnownHostsFile=/dev/null的东西相结合。试一试

代码语言:javascript
复制
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@10.1.1.1
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1462362

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档