【问题标题】:SSH client offers command to remove known hostSSH 客户端提供删除已知主机的命令
【发布时间】:2016-02-07 17:48:18
【问题描述】:

在我的 Ubuntu 服务器上,当我即将通过 SSH 连接到具有不同指纹的已知主机时,它为我提供了从 known_hosts 文件中删除该主机的命令。 F.e. remove with: ssh-keygen -f "/home/rogier/.ssh/known_hosts" -R 192.168.1.4.

不幸的是,OSX 上的默认 SSH 客户端不提供此功能。是否可以添加此行为?

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
18:7e:1f:24:5f:1d:52:b4:32:2c:ed:8e:9a:cc:0a:f7.
Please contact your system administrator.
Add correct host key in /home/rogier/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/rogier/.ssh/known_hosts:27
  remove with: ssh-keygen -f "/home/rogier/.ssh/known_hosts" -R 192.168.1.4
ECDSA host key for 192.168.1.4 has changed and you have requested strict checking.
Host key verification failed.

【问题讨论】:

  • 显然,您必须安装另一个 ssh 客户端。不是很困难,但你必须自己活跃起来。

标签: ssh


【解决方案1】:

不幸的是,OSX 上的默认 SSH 客户端不提供此功能。是否可以添加此行为?

从 brew 安装更新的 openssh

或者只是从known_hosts 文件中删除提到的行,因为该命令不会比这更神奇。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-23
    • 1970-01-01
    • 2021-01-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多