hadoop@master:~$ scp /home/hadoop/.ssh/authorized_keys node3:/home/hadoop/.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 a8:68:2e:0e:1e:67:33:db:0f:f8:d0:0b:43:fe:17:e2. Please contact your system administrator. Add correct host key in /home/hadoop/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /home/hadoop/.ssh/known_hosts:6 remove with: ssh-keygen -f "/home/hadoop/.ssh/known_hosts" -R node3 ECDSA host key for node3 has changed and you have requested strict checking. Host key verification failed. lost connection
出现错误原因:
之前使用ssh登录过该机器,在~/.ssh/known_host中记录了该信息。
解决方案:删除known_host文件中的内容。
hadoop@master:~$ cd .ssh hadoop@master:~/.ssh$ ls authorized_keys id_rsa id_rsa.pub known_hosts hadoop@master:~/.ssh$ sudo vim known_hosts [sudo] password for hadoop: hadoop@master:~/.ssh$ scp authorized_keys node1:/home/hadoop/.ssh/ authorized_keys 100% 395 0.4KB/s 00:00 hadoop@master:~/.ssh$ scp authorized_keys node2:/home/hadoop/.ssh/ authorized_keys 100% 395 0.4KB/s 00:00 hadoop@master:~/.ssh$ scp authorized_keys node3:/home/hadoop/.ssh/ hadoop@node3's password: authorized_keys 100% 395 0.4KB/s 00:00 hadoop@master:~/.ssh$
参考:http://www.cnblogs.com/york-hust/archive/2012/03/27/2420168.html