阿里云(一)

问题:今天在把阿里云服务器的磁盘格式化之后,然后Mac在用ssh登录时,遇见以下问题;

deltalphas-MacBookPro:~ fuzongjian$ ssh [email protected]

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@    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:DZmFKalnzPtbKO+9ppAmdG4CuPiN8Shc9XJvDqgNPMc.

Please contact your system administrator.

Add correct host key in /Users/fuzongjian/.ssh/known_hosts to get rid of this message.

Offending ECDSA key in /Users/fuzongjian/.ssh/known_hosts:3

ECDSA host key for 120.77.210.155 has changed and you have requested strict checking.

Host key verification failed.


解决方案:

1、用以下指令

cat ~/.ssh/known_hosts

出现下面界面

deltalphas-MacBookPro:~ fuzongjian$ cat ~/.ssh/known_hosts

github.com,192.30.255.113 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==

[222.197.181.25]:16022 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJpvJEto6/vEuf7deuCSRVU5VzSUYxmxII3gZYdl3ZHVmWkTYCYUA6U4WivYWhE1NteTCg6heaw0VK48FHo6q68=


120.77.210.155 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBYCOJ03E1OeBc/dWR7tDa+DqzL2EerwU9n9/XqWncUrdnvNDGWuzPwEec/aw8MLYiQfy5FobeVK2tiYeTZ0wek=


2、我的服务器地址为120.77.210.155,用以下指令直接将其删除,然后保存重新用ssh登录服务器即可。

vim ~/.ssh/known_hosts



你可能感兴趣的:(服务器)