我在远程机器上运行Ubuntu 10.10。我每天都没有问题地使用它,但是今天突然出现了以下错误:
ssh_exchange_identification: Connection closed by remote host
如果连接-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
权限,并尝试从其他计算机连接以得到相同的错误。
另外,您可以粘贴sshd_config以及host.allow / host.deny文件吗?顺便说一句,您可以在本地连接:ssh localhost吗?
—
Rilindo 2011年
我看不到sshd_config-但如何处理:使用如下调试在备用端口上运行sshd:/ usr / sbin / sshd -p222 -d -f / etc / ssh / sshd_config
—
Rilindo 2011年
-vvv
并获得~/.ssh
文件夹和~/.ssh/authorized_keys
文件的许可?