无法通过 ssh 连接到我的 vps 服务器,权限被拒绝

无法通过 ssh 连接到我的 vps 服务器,权限被拒绝

我看过类似的问题,但对我来说都没有用,我用django和apache建立了一个网站,但今天当我尝试打开我的网站时突然出现一个错误,它只显示

Apache2 Ubuntu Default Page
This is the default welcome page used to test the correct operation of the Apache2 server after 
installation on Ubuntu systems. It is based on the equivalent page on Debian etc ..  

之前大约 9 个月运行正常,我尝试通过 ssh 终端连接到服务器

ssh username@my_ip_address

但它引发了这个错误

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 可能有人正在做一些恶意的事情!有人可能现在正在窃听你(中间人攻击)!主机密钥也可能刚刚被更改。远程主机发送的 ECDSA 密钥的指纹是 SHA256:the_key 请联系您的系统管理员。在 /home/username/.ssh/known_hosts 中添加正确的主机密钥以消除此消息。/home/username/.ssh/known_hosts:2 中存在问题的 ECDSA 密钥 my_ip 的 ECDSA 主机密钥已更改,您已请求严格检查。主机密钥验证失败。

我运行这个命令

ssh-keygen -R my_ip

和输出

找到主机 my_ip_address:第 2 行 /home/username/.ssh/known_hosts 已更新。原始内容保留为 /home/usernmae/.ssh/known_hosts.old

现在我尝试再次连接,但ssh username@my_ip输入密码后,它显示

权限被拒绝,请重试。

并尝试过ssh username@my_ip -p 80

并引发了这个错误

ssh_exchange_identification:远程主机关闭连接

ubuntu : 18 感谢您的帮助

相关内容