ssh_exchange_identification: соединение закрыто удаленным хостом x - PullRequest
0 голосов
/ 07 марта 2019

Среда: Версия Git Ubuntu-14.04-LTS - 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.
...