【问题标题】:CentOS 6 Connection closed by remote hostCentOS 6连接被远程主机关闭
【发布时间】:2016-05-13 02:02:50
【问题描述】:

安装 owncloud 并运行 MySQL 安全设置后,我无法再连接到服务器。我收到以下错误:

MacBook-Pro:~ username$ ssh -i ~/.ssh/authorized_keys2 root@x.x.x.x -v
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to x.x.x.x [x.x.x.x] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /Users/username/.ssh/authorized_keys2 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/username/.ssh/authorized_keys2-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
ssh_exchange_identification: Connection closed by remote host

发生了什么,我该如何解决?我仍然有与服务器的活动连接

【问题讨论】:

  • 检查日志。看起来像 tcp_wrappers (/etc/hosts.allow, /etc/hosts.deny) 问题。
  • grep sshd /etc/hosts.allow 不返回任何内容,拒绝返回相同
  • 不要在那里grep。行数很少。将它们发布到已编辑的问题。同时发布您机器上的最新日志。

标签: ssh centos6


【解决方案1】:

检查 /var/log/messages 文件并查看错误消息是什么。在许多情况下,这只是权限配置错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-01-25
    • 1970-01-01
    • 2019-10-27
    • 2014-07-30
    • 2021-02-04
    • 1970-01-01
    • 1970-01-01
    • 2021-05-12
    相关资源
    最近更新 更多