ssh-copy-id报错: Host key verification failed
/workspace:$ ssh-copy-id root@10.103.xx.xx -p 22022
/usr/local/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/local/bin/ssh-copy-id:
ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ERROR: @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ERROR: IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
ERROR: Someone could be eavesdropping on you right now (man-in-the-middle attack)!
ERROR: It is also possible that a host key has just been changed.
ERROR: The fingerprint for the RSA key sent by the remote host is
ERROR: 83:33:90:ef:18:de:71:19:52:03:d2:c0:98:de:a5:b3.
ERROR: Please contact your system administrator.
ERROR: Add correct host key in /Users/angela/.ssh/known_hosts to get rid of this message.
ERROR: Offending RSA key in /Users/angela/.ssh/known_hosts:3
ERROR: RSA host key for [10.103.xx.xx]:22022 has changed and you have requested strict checking.
ERROR: Host key verification failed.
这种情况的产生原因是公钥变化而引起的无法登陆,在 known_hosts里删除对应的公钥信息就可以啦。
$ vim ~/.ssh/known_hosts