SSH客户端提供删除已知主机的命令

时间:2016-02-07 09:36:09

标签: ssh

在我的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.

1 个答案:

答案 0 :(得分:0)

  

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

从brew安装更新的openssh

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