Score:0

getting kex_exchange_identification: Connection closed by remote host for priavate gitlab domain, what may the cause?

in flag

I am in Ubuntu 20.04.2 LTS telling this because looks like this version has encryption issues. Today I created a key that's perfectly working on [email protected] but gives kex_exchange_identification: Connection closed by remote host for private GitLab domain here is the .ssh config file

Host gitlab.com
Hostname altssh.gitlab.com
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_ed25519

# Private GitLab instance
Host gitlab.ebpearls.com
Hostname gitlab.ebpearls.com
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_ed25519

here is the full log

ssh -Tvvv git@gitlab.<mycompanydomain>.com
OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /home/nabin/.ssh/config
debug1: /home/nabin/.ssh/config line 9: Applying options for gitlab.ebpearls.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolving "gitlab.ebpearls.com" port 443
debug2: ssh_connect_direct
debug1: Connecting to gitlab.ebpearls.com [mycompanyip] port 443.
debug1: Connection established.
debug1: identity file /home/nabin/.ssh/id_ed25519 type 3
debug1: identity file /home/nabin/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.3
debug1: kex_exchange_identification: banner line 0: HTTP/1.1 400 Bad Request
debug1: kex_exchange_identification: banner line 1: Server: nginx
debug1: kex_exchange_identification: banner line 2: Date: Wed, 06 Oct 2021 06:50:54 GMT
debug1: kex_exchange_identification: banner line 3: Content-Type: text/html
debug1: kex_exchange_identification: banner line 4: Content-Length: 150
debug1: kex_exchange_identification: banner line 5: Connection: close
debug1: kex_exchange_identification: banner line 6: 
debug1: kex_exchange_identification: banner line 7: <html>
debug1: kex_exchange_identification: banner line 8: <head><title>400 Bad Request</title></head>
debug1: kex_exchange_identification: banner line 9: <body>
debug1: kex_exchange_identification: banner line 10: <center><h1>400 Bad Request</h1></center>
debug1: kex_exchange_identification: banner line 11: <hr><center>nginx</center>
debug1: kex_exchange_identification: banner line 12: </body>
debug1: kex_exchange_identification: banner line 13: </html>
kex_exchange_identification: Connection closed by remot
David avatar
cn flag
looks like this version has encryption issues What is this statement based on? You are also behind in updates you say 20.04.2 and if fully up to date it would be 20.04.3
NavinRaj Pandey avatar
in flag
it was not supporing / not working for aes-256-cbc-hmac-sha1 I had to use aes-256-cbc ony to make it work in a node project in this version only not in the older ones
muru avatar
us flag
Did you enable SSH on 443 in your private Gitlab?
Score:0
in flag

Thats because private gitlab repo doesn't allow ssh from 443 and ISP doesn't allow port 22 for ssh. For those private repo which allow 443 this solution will work. I should be looking for some Jump server sloution where I can use the middle jump server's port 443 then ssh to port 22 of targeted server from there.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.