问题原文
原帖链接 · Tampa · CC BY-SA 3.0
Why or why am I getting this error on server A trying to connect to server B?????
ssh [email omitted]
Warning: the ECDSA host key for 'zk.111.sf.development.cloudera.fu.com' differs from the key for the IP address '107.170.xxx.xxx'
Offending key for IP in /root/.ssh/known_hosts:4
Matching host key in /root/.ssh/known_hosts:5
Are you sure you want to continue connecting (yes/no)? no
Host key verification failed.
enter code here
On server A I do this
eval `ssh-agent -s`
ssh-keyscan 107.170.xxx.xxx | tee -a /root/.ssh/known_hosts
Then I try and ssh. Wow..both servers event have the same pub and private keys. I am trying to set passwordless auth between servers.
已采纳解答
原帖链接 · Vinícius Ferrão · CC BY-SA 3.0
It appears that some of your hosts have changed IP's recently and you've connected to them after and before the IP changes.
I would recommend you to cleanup your known_hosts file in the lines 4 and 5 to get rid of this error message.
Another thing to consider is: if you only want Server A connecting to Server B you just need to drop the Server A Public Key (the contents of id_dsa.pub or id_rsa.pub) in /root/.ssh/authorized_keys of Server B.
If you do want bidirectional connection you should do the same procedure for Server B to A.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
