ssh-copy-id Permission denied (publickey,gssapi-keyex,gssapi-with-mic). 的解決方案


-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: 1 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
14:e1:17:8a:d7:f1:a9:6e:0d:36:cf:ff:18:60:15:42.
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:1
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 下

最近再給登陸的用戶設置個密碼,就解決了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM