-bash-4.2# ssh-copy-id 192.168.9.180
/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: key(s) remain to be installed -- if you are prompted now it is to install the new keys
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
-bash-4.2# ssh root@192.168.9.180
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
:e1::8a:d7:f1:a9:6e:0d::cf:ff::::.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:
ECDSA host key for 192.168.9.180 has changed and you have requested strict checking.
Host key verification failed.
如果 是报的这个错:
Host key verification failed.
vi /etc/ssh/sshd_config
修改 PasswordAuthentication no
为 PasswordAuthentication yes
重启 sudo systemctl restart sshd
如果 是报的是 publickey,gssapi-keyex,gssapi-with-mic
passwd root 下
最近再给登陆的用户设置个密码,就解决了