上周开始试着使用Linode,第一次新建了一个CentOS 7系统image后不知道在装LAMP时哪步出了问题,所以就重装了一下系统。结果在SSH连接时出现如下错误:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@
@ 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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is

会出现这样的错误是因为,第一次进行SSH连接时,电脑会生成一个认证储存在客户端中的known_hosts,但如果服务器重新装过以后,认证信息相应地也会发生变化。服务器和客户端的信息不匹配时,就会提示错误。解决办法就是将know_hosts文件里那个无效的记录删除。

Mac系统用户在终端输入
nano ~/.ssh/known_hosts

Windows系统PuTTY用户要在注册表里找如下信息:

HKEY_CURRENT_USERSoftwareSimonTathamPuTTYSshHostKeys

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s