ubuntu – 无处不在,ssh_exchange_identification:远程主机关闭了连接

我在远程盒子上运行Ubuntu 10.10.我每天都没有问题,但今天突然出现,我得到以下错误:

ssh_exchange_identification:远程主机关闭连接

如果我用-vv连接,我得到以下内容:

OpenSSH_5.6p1,OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /Users/bla/.ssh/config
debug1: Applying options for ubuntu-server
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to ubuntu-server.com [123.123.123.123] port 22.
debug1: Connection established.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /Users/bla/.ssh/id_rsa type -1
debug1: identity file /Users/bla/.ssh/id_rsa-cert type -1
ssh_exchange_identification: Connection closed by remote host

如果我删除密钥,我得到完全相同的输出(没有“debug2:key_type _…).我已设法物理登录并检查我的hosts.allow和hosts.deny但他们没有条目.我试图删除并重新安装OpenSSH,检查authorized_keys和〜/ .ssh权限,并尝试从其他计算机连接只是为了得到相同的错误.我在我的智慧结束,任何帮助将不胜感激.

同样的错误

ssh_exchange_identification: Connection closed by remote host

私钥(文件)可被所有人读取,即具有错误的权限时发生.

例如,如果有任何私钥

> ssh_host_key
> ssh_host_dsa_key
> ssh_host_rsa_key

在/ etc / ssh /中是chmod 644(应该是chmod 600).

以下权限导致“ssh_exchange_identification:远程主机关闭连接”错误:

root@host:/etc/config/ssh# ls -la
drwxrwxrwx    2 root     root            0 Aug 24  2005 .
drw-rw-rw-    3 root     root            0 Apr  3  2007 ..
-rw-r--r--    1 root     root        88039 Aug 24  2005 moduli
-rw-r--r--    1 root     root         1559 Aug 24  2005 ssh_config
-rw-r--r--    1 root     root          668 Aug 24  2005 ssh_host_dsa_key
-rw-r--r--    1 root     root          599 Aug 24  2005 ssh_host_dsa_key.pub
-rw-r--r--    1 root     root          524 Aug 24  2005 ssh_host_key
-rw-r--r--    1 root     root          328 Aug 24  2005 ssh_host_key.pub
-rw-r--r--    1 root     root          883 Aug 24  2005 ssh_host_rsa_key
-rw-r--r--    1 root     root          219 Aug 24  2005 ssh_host_rsa_key.pub
-rw-r--r--    1 root     root         2018 Aug 25  2005 sshd_config

现在应该接受更正的权限,连接:

root@host:/etc/config/ssh# ls -la                    
drwxrwxrwx    2 root     root            0 Aug 24  2005 .
drw-rw-rw-    3 root     root            0 Apr  3  2007 ..
-rw-r--r--    1 root     root        88039 Aug 24  2005 moduli
-rw-r--r--    1 root     root         1559 Aug 24  2005 ssh_config
-rw-------    1 root     root          668 Aug 24  2005 ssh_host_dsa_key
-rw-r--r--    1 root     root          599 Aug 24  2005 ssh_host_dsa_key.pub
-rw-------    1 root     root          524 Aug 24  2005 ssh_host_key
-rw-r--r--    1 root     root          328 Aug 24  2005 ssh_host_key.pub
-rw-------    1 root     root          883 Aug 24  2005 ssh_host_rsa_key
-rw-r--r--    1 root     root          219 Aug 24  2005 ssh_host_rsa_key.pub
-rw-r--r--    1 root     root         2018 Aug 25  2005 sshd_config

相关文章

文章浏览阅读2.3k次,点赞4次,收藏22次。最近安装了CARLA预...
文章浏览阅读6.3k次,点赞5次,收藏15次。在清华镜像中下载U...
文章浏览阅读5k次。linux环境, python3.7.问题描述: 安装...
文章浏览阅读4.2k次,点赞4次,收藏17次。要安装这个 standa...
文章浏览阅读894次,点赞51次,收藏31次。在安卓使用vscode主...