阿里云远程连接,在网页上的终端远程连接PasswordAuthentication no 改为yes,重启sshd服务,教程https://help.aliyun.com/knowledge_detail/41501.html
本地连接出现:错误
omycar111:~ OMyCar$ ssh root@120.79.45.19
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
SHA256:aUfpq8kSfIQPomUtprWuNVgL3rMuh1ksDDi8otK8ZUk.
Please contact your system administrator.
Add correct host key in /Users/OMyCar/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/OMyCar/.ssh/known_hosts:39
ECDSA host key for 120.79.45.19 has changed and you have requested strict checking.
Host key verification failed.
解决方案:
比如我的用户是OMyCar,立即前往编辑/Users/OMyCar/.ssh/下的known_hosts文件
sudo vim /Users/OMyCar/.ssh/known_hosts
找到120.79.45.19,删掉就行
然后再试