Did Mavericks kill SSH?

corbinmharris
Contributor

2012 MBP running 10. 9 Mavericks. Attempted enrollment with Recon 9.2
Error: A connection error occurred: SSH failed to start up session with host '127.0.0.1' (Remote host closed connection) Confirmed that SSH is on and the admin pw for the Management Account is correct. Tried to do a remote enrollment and received an error that port 22 is off.
I confirmed that the hosts file is correct with 127.0.0.1 localhost

Any ideas?

Thanks!
Corbin

1 ACCEPTED SOLUTION

Chris
Valued Contributor

I ran into this today.
For me the issue was that /var/empty wasn't owned by root for whatever reason.
In /var/log/system.log it showed

sshd[1654]: fatal: /var/empty must be owned by root and not group or world-writable.
sudo chown -R root /var/empty/

fixed it.

View solution in original post

14 REPLIES 14

nessts
Valued Contributor II

Firewall?

Sean_M_Harper
Contributor

No issue on my side. I would agree it is likely network related (and firewall at that).

corbinmharris
Contributor

Firewall is enabled but allows port 22/SSH on my Mac
Having the same issue with my boss, Recon 9.2 is not able to connect to his MBA running 10.9, but he sent me confirmation the SSH is running. He does not have firewall on -

dhcp-10-14-70-249:~ esantelices$ netstat -an | grep 22 | grep LISTEN
tcp4 0 0 *.22 *.* LISTEN
tcp6 0 0 *.22 *.* LISTEN

corbinmharris
Contributor

I'm getting the same results in the terminal -
Last login: Thu Nov 7 11:24:47 on console
mbp153F1G3:~ charris$ netstat -an | grep 22 | grep LISTEN
tcp6 0 0 *.22 *.* LISTEN tcp4 0 0 *.22 *.* LISTEN mbp153F1G3:~ charris$

nessts
Valued Contributor II

works for me and has since seed1

kstrick
Contributor III

I have one machine with mavericks that is exhibiting this behavior

corbinmharris
Contributor

Thanks everyone! I took the ultimate step and reinstalled Mavericks this morning. Recon 9.2 connected to JSS without a problem even with the firewall on.

Corbin

Chris
Valued Contributor

I ran into this today.
For me the issue was that /var/empty wasn't owned by root for whatever reason.
In /var/log/system.log it showed

sshd[1654]: fatal: /var/empty must be owned by root and not group or world-writable.
sudo chown -R root /var/empty/

fixed it.

jhbush
Valued Contributor II

Chris, thanks for the fix. I had a few test 10.9 VM's exhibit this behavior.

leegalan
New Contributor III

Thanks for the fix. This helped me out of some frustration. Any ideas as to what causes this? Thanks again.

psherman
New Contributor

Thanks mate.

nigelg
Contributor

I had this issue this morning on a Sierra machine. The /var/empty folder was owned by a domain user account. changing ownership to root fixed it straight away.

hector_cast
New Contributor II

This fix worked for me. I noticed this same issue on a macOS 10.13.1 (17B1003) after deleting my initial temporary administrator account using DEP enrollment.

andrewtadkins5
New Contributor II

Saw the same error message on a 10.12.6 Mac this morning that turned out to be an erroneous subnet mask. Verified that the mask that worked was proper by our network team, and updated the documentation.