每次从主机登录SSH公共密钥时都会显示警告:"ONTAP集群"的ECDSA主机密钥与IP地址"cluster-mgmt"的密钥不同
适用场景
- ONTAP 9
- 使用公共密钥通过SSH访问ONTAP
问题描述
- 在cluster-m、GMT迁移到另一个节点后、 每次从客户端登录SSH公共密钥时都会显示登录提示:
Username@hostname:/im$ ssh ONTAPcluster
Warning: the ECDSA host key for 'ONTAPcluster' differs from the key for the IP address 'cluster-mgmt'
Offending key for IP in /home/Username/.ssh/known_hosts:2
Matching host key in /home/Username/.ssh/known_hosts:14
Are you sure you want to continue connecting (yes/no)? yes - 从客户端的
known_hosts
文件中删除ONTAP集群条目、但仍会显示:
Username@hostname:~/.ssh$ ssh-keygen -R ONTAPcluster
# Host ONTAPcluster found: line 8
/home/Username/.ssh/known_hosts updated.
Original contents retained as /home/Username/.ssh/known_hosts.old
Username@hostname:/im$ ssh ONTAPcluster
The authenticity of host 'ONTAPcluster (cluster-mgmt)' can't be established.
ECDSA key fingerprint is SHA256:HTD2anAXhctocDmZtr7/aP5QraLVfi6s1bYczavC538.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'ONTAPcluster' (ECDSA) to the list of known hosts.
Warning: the ECDSA host key for 'ONTAPcluster' differs from the key for the IP address 'cluster-mgmt'
Offending key for IP in /home/Username/.ssh/known_hosts:2
Are you sure you want to continue connecting (yes/no)? yes