E20-ssh分发密钥报错

[s-linuxad@T-Ansible-v-szzb scripts]$  ssh-copy-id -i ~/.ssh/id_dsa.pub [email protected]
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/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 ECDSA key sent by the remote host is
ERROR: 21:f2:a9:a8:91:8f:53:89:6e:d9:b3:15:6c:0f:67:0a.
ERROR: Please contact your system administrator.
ERROR: Add correct host key in /home/s-linuxad/.ssh/known_hosts to get rid of this message.
ERROR: Offending ECDSA key in /home/s-linuxad/.ssh/known_hosts:1166
ERROR: ECDSA host key for 10.0.138.48 has changed and you have requested strict checking.
ERROR: Host key verification failed.

[s-linuxad@T-Ansible-v-szzb scripts]$ ssh-keygen -R 10.0.138.48
# Host 10.0.138.48 found: line 1166 type ECDSA
/home/s-linuxad/.ssh/known_hosts updated.
Original contents retained as /home/s-linuxad/.ssh/known_hosts.old
[s-linuxad@T-Ansible-v-szzb scripts]$  ssh-copy-id -i ~/.ssh/id_dsa.pub [email protected]
The authenticity of host '10.0.138.48 (10.0.138.48)' can't be established.
ECDSA key fingerprint is 21:f2:a9:a8:91:8f:53:89:6e:d9:b3:15:6c:0f:67:0a.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
[email protected]'s password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh '[email protected]'"
and check to make sure that only the key(s) you wanted were added.

主要命令是 ssh-keygen -R "远程连接的IP"

猜你喜欢

转载自my.oschina.net/u/3635512/blog/1786027