首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当您在known_hosts中有冲突的密钥时,是否可以启用代理转发?

当您在known_hosts中有冲突的密钥时,是否可以启用代理转发?
EN

Unix & Linux用户
提问于 2020-01-10 20:49:46
回答 1查看 1.8K关注 0票数 2

每当我连接到我的主机,我看到

代码语言:javascript
复制
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:J6ErF8jeZVKGsg0db5u2hiNeQbH4pdGzPcbpGXZhOm8.
Please contact your system administrator.
Add correct host key in /home/ecarroll/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/ecarroll/.ssh/known_hosts:50
  remove with:
  ssh-keygen -f "/home/ecarroll/.ssh/known_hosts" -R "10.1.38.15"
ECDSA host key for 10.1.38.15 has changed and you have requested strict checking.
Host key verification failed.

我可以避开打字的需要

代码语言:javascript
复制
  ssh-keygen -f "/home/ecarroll/.ssh/known_hosts" -R "10.1.38.15"

通过在对ssh的调用中使用-o StrictHostKeyChecking=no。不过,即使我这么做。我明白了,

代码语言:javascript
复制
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:ZVbYVYb0m3udeHMkycdZCF4HK7sGUzVnQmhTjDFTa6Y.
Please contact your system administrator.
Add correct host key in /home/ecarroll/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/ecarroll/.ssh/known_hosts:50
  remove with:
  ssh-keygen -f "/home/ecarroll/.ssh/known_hosts" -R "10.1.38.15"
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Agent forwarding is disabled to avoid man-in-the-middle attacks.

你会看到这条线的底部

代码语言:javascript
复制
Agent forwarding is disabled to avoid man-in-the-middle attacks.

不管怎样,我还能让代理转发吗?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2020-01-11 01:18:11

为了解决这个问题,你能做的就是删除那个文件--别担心,你只需要做一次。把这两种选择混合起来,

代码语言:javascript
复制
StrictHostKeyChecking=no
UserKnownHostsFile=/dev/null

您可以将其放入ssh配置文件~/.ssh/config或使其成为别名,

代码语言:javascript
复制
alias ssh0="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"

这将转发代理,并在不进行任何进一步配置的情况下处理多个框。

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/561493

复制
相关文章

相似问题

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