连接被拒绝,我无法通过 ssh 进入我的服务器

连接被拒绝,我无法通过 ssh 进入我的服务器

我不确定我的网站是被黑客入侵了还是出现了与服务器相关的错误。自从我发布网站以来,它一直运行良好,昨天我访问它时,它显示拒绝连接。我通知了我的托管服务提供商,他们告诉我创建一个新的数据库连接,当我打开 phpMyAdmin 时,我收到一个奇怪的错误,上面写着:

Warning in ./libraries/plugins/auth/AuthenticationCpanel.php#629
mysqli_connect(): (HY000/2002): Can't connect to local MySQL server 
through socket '/var/lib/mysql/mysql.sock' (2)

当我尝试通过 ssh 进入我的服务器时出现以下错误:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The RSA host key for [wesocular.com]:60504 has changed,
and the key for the corresponding IP address [46.105.40.12]:60504
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 RSA key sent by the remote host is
SHA256:EvplXyAHYO4nP4rmOtJ2j3wc4O04UMUWMvLi9ZpsVuU.
Please contact your system administrator.
Add correct host key in /c/Users/Game330/.ssh/known_hosts to get rid of this mes   sage.
Offending RSA key in /c/Users/Game330/.ssh/known_hosts:1
RSA host key for [wesocular.com]:60504 has changed and you have requested strict    checking.

可能是什么问题呢 ?

答案1

如果您阅读错误消息,您就会发现原因:The RSA host key for [wesocular.com]:60504 has changed, and the key for the corresponding IP address [46.105.40.12]:60504 is unknown.

然后有解决方案如何修复它:Add correct host key in /c/Users/Game330/.ssh/known_hosts to get rid of this message. Offending RSA key in /c/Users/Game330/.ssh/known_hosts:1

因此,您可以删除文件第 1 行中的密钥/c/Users/Game330/.ssh/known_hosts,然后尝试再次通过 SSH 登录。

相关内容