返回文档
故障排除
解决连接问题
修复 Server Compass 和 VPS 之间常见的 SSH 连接问题。
Intermediate5 min readUpdated 2024-02-01
连接被拒绝
原因:SSH 服务未运行或端口错误
解决方案:
- 验证 SSH 是否运行:
systemctl status sshd - 检查使用正确的端口
- 验证防火墙允许 SSH:
ufw status - 使用 ping 检查服务器是否在线
认证失败
原因:凭证错误
解决方案:
- 仔细检查用户名和密码
- 对于 SSH 密钥,验证密钥在服务器上已授权
- 检查服务器上的
~/.ssh/authorized_keys - 尝试使用密码连接以验证账户
连接超时
原因:网络问题或防火墙阻止
解决方案:
- 检查网络连接
- 验证服务器可达(ping)
- 检查端口 22 是否被网络阻止
- 验证服务器防火墙允许您的 IP
主机密钥验证失败
原因:服务器的 SSH 密钥已更改
解决方案:
- 如果服务器重新安装,这是预期的
- 在 Server Compass 中,点击"接受新密钥"
- 或从
~/.ssh/known_hosts中删除旧密钥
Screenshots

Ready to try Server Compass?
Download the app and deploy your first application in under 5 minutes.
Download Server Compass