ssh_exchange_identification: Connection closed by remote host under Git bash

后端 未结 26 2519
梦谈多话
梦谈多话 2021-01-30 08:57

I work at win7 and set up git server with sshd. I git --bare init myapp.git, and clone ssh://git@localhost/home/git/myapp.git in Cywgin

相关标签:
26条回答
  • 2021-01-30 09:11

    Simple server reboot solved the problem for me. Try hard reboot , if dont work after soft reboot.

    0 讨论(0)
  • 2021-01-30 09:13

    Please use Port 7999 and Try. it will work

    0 讨论(0)
  • 2021-01-30 09:16

    For me, the issue was that there was a proxy set in /etc/ssh/ssh_config and it was down, solved the issue by whitelisting the remote git IP and removing the proxy line.

    Hope this helps someone.

    0 讨论(0)
  • 2021-01-30 09:16

    I had this problem today and I realize that I was connected to 2 differente networks (LAN and WLAN), I solved it just disconnecting the cable from my Ethernet adapter. I suppose that the problem is caused because the ssh key is tied with the MAC address of my wireless adapter. I hope this helps you.

    0 讨论(0)
  • 2021-01-30 09:21

    if hostname does not work, try IP address.

    This is going on right now so I have to say. I try to ssh with my host name and it does not work

    ssh root@host.example.net
    

    this gives the error "ssh_exchange_identification: Connection closed by remote host"

    this USED to work one hour back.

    BUT, and here is the interesting part, the IP address works!

    ssh root@192.168.0.100
    

    (of course the actual IP address is different)

    Go figure!

    0 讨论(0)
  • 2021-01-30 09:24

    You can get "ssh_exchange_identification: Connection closed by remote host" if your sshd service is not operational!

    If you have access to the server check you have the sshd service running with:

      ps aux | grep ssh
    

    and check it is listening on port 22:

     netstat -plant | grep :22
    

    more details here

    0 讨论(0)
提交回复
热议问题