25.1 C
Cuttack
Friday, March 15, 2024
HomeMACssh 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 Ojhahttps://lifeonnetwork.com/
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.
RELATED ARTICLES

4 COMMENTS

  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.

  2. Thanks man, the Remote Login thing worked. I have a process that’s worked for years, where I ssh from my mac, to my remote Linux server. A reverse port is opened in the process, and then from the remote host, I can ssh (or scp) back into the mac, without further identification. Very handy for my scripts. But then it stopped working after some system settings were lost in a hardware upgrade.

    I guess I must have enabled this at some point in the past, but I forgot. So, thank you!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular