ssh_exchange_identification:连接被远程主机x关闭

时间:2019-03-07 03:32:20

标签: git ssh openssl ubuntu-14.04 gerrit

环境: Ubuntu-14.04-LTS Git版本– 1.9

问题:  从Ubuntu终端运行ssh -Tvvv -p 29418 git-user@gerrit.server.com时,它失败并显示以下错误。

错误:

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug2: ssh_connect: needpriv 0
debug1: Connecting to gerrit.server.com [101.102.103.104] port 29418.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug3: Incorrect RSA1 identifier
debug3: Could not load "/root/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.13
debug1: ssh_exchange_identification: <Script>

debug1: ssh_exchange_identification: document.location.href = "https://109.101.11.228:8080/";

ssh_exchange_identification: Connection closed by remote host

为解决此问题,我们尝试了以下解决方法,但是到目前为止,没有一个方法可以帮助我们解决此问题。

1.  ~/.ssh/id_rsa.pub key and user name verified in Gerrit GUI Settings.
2.  Permission applied like 
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
3.  Checked /etc/hosts.allow & /etc/hosts.deny files with working machine, both are identical.
4.  Executed unset https_proxy & unset http_proxy commands
5.  Checked .gitconfig file. 
6.  Created vi .ssh/config file and added below info.
Host gerrit.server.com
User git-user
Port 29418
7.  Reinstalled OpenSSL and rebooted the machine.
8.  Tried dpkg-reconfigure openssh-server
9.  Firewall not running.
10. Ifconfig shows only eth0 & lo (No problem here).
11. Verified /etc/ssh/sshd_config with working machine, no problem with this file.

0 个答案:

没有答案