1
votes

I am using Mac OS X ElCapitan(10.11.6) version. And i am trying to push files to github which gives me connection closed by remote host error. On further searching and debugging I have tried all the options mentioned but could move forward.

Following is the output of my ssh -vvv localhost command: ssh -vvvv localhost OpenSSH_6.9p1, LibreSSL 2.1.8 debug1: Reading configuration data /Users//.ssh/config
debug1: /Users//.ssh/config line 1: Applying options for *
debug1: /Users//.ssh/config line 18: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: Executing proxy command: exec ssh -q -W localhost:22 gateway.example.com
debug1: identity file /Users//.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users//.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: permanently_drop_suid: 501
debug1: identity file /Users//.ssh/identity type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users//.ssh/identity-cert type -1
debug1: identity file /Users//.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users//.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users//.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users//.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
ssh_exchange_identification: Connection closed by remote host

======= Following is the ~/.ssh/config file details.

Host *
ForwardAgent no
ForwardX11 no
ForwardX11Trusted yes
Port 22
Protocol 2
IdentityFile ~/.ssh/id_rsa

Appreciate if someone can throw some light on this. Have been struggling with this for quite a while now.

Thanks

1

1 Answers

0
votes

After trying out a lot of suggestions given in various blogs, the below solution worked for me. I just commented out the below line in the ssh_config file:

/etc/ssh/ssh_config and comment the following line #ProxyCommand /usr/bin/sss_ssh_knownhostsproxy -p %p %h