Home > MAC > ssh exchange identification connection closed by remote host

ssh exchange identification connection closed by remote host

ssh exchange identification connection closed by remote host

Getting this error while accessing ssh configured on MAC OSX

ssh exchange identification connection closed by remote host

Solution:

Go to System preferencesSharing and enable remote login

Option is there to allow everybody to access through ssh else allow
specific users.

Turn OFF and turn it ON again and see if you are able to connect through
ssh

I could get exact error on system.log file

Open terminal #sudo tail -f /var/log/system.log

Feb 19 14:38:48 devsrv.local WindowServer[200]:
CGXRegisterWindowWithSystemStatusBar: window 17 already registered
Feb 19 14:39:18 devsrv.local sshd[1086]: fatal: /var/empty must be owned
by root and not group or world-writable.
Feb 19 14:39:27 devsrv.local sshd[1088]: fatal: /var/empty must be owned
by root and not group or world-writable.

It’s something permission related issue where /var/empty folder is not writable by root which was stopping to run ssh service

Open terminal #sudo chmod 755 /var/empty

You can do a reboot of the MAC OSX and you should be able to connect
through SSH without any error.

“ssh_exchange_identification: Connection closed by remote host”

You may also like: Install and configure Jasper Report Server on Ubuntu Server

Durga Charan Ojha
I am a proud Indian, proud father, a blogger, Being in a profession as System administrator, my passion is troubleshooting computer issues, I do like sharing solutions through blogging making videos of solving issues.
https://lifeonnetwork.com/

One thought on “ssh exchange identification connection closed by remote host

  1. Odd that in my case, I tried it before I left home, using a WAN address, which I thought would have shown any firewall/permission problems. I even turned off Little Snitch. Then when I got to my remote location, I get that error.

Leave a Reply

Your email address will not be published. Required fields are marked *