SSH and Lion 10.7.1

hsthompson

Registered
I can't ssh into any machine running Lion (10.7.1). I've tried from Lion to Lion, Snow Leopard to Lion, Leopard to Lion, and Tiger to Lion. All produce this error:

Code:
ssh_exchange_identification: Connection closed by remote host

In fact, I can't even log in from one machine into itself. Typically, I could type in,

Code:
ssh user@localhost

and it'd work as expected. Instead it produces the same error.

I've tried emptying the known_hosts and authorized_keys files, but the results remain unchanged.

Has anyone experienced this issue?
 
I'd already emptied known_hosts. I tried deleting it for good measure, but still the same result.

I am not, and was not, getting the error:

Code:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

It was an error that's new to me:

Code:
ssh_exchange_identification: Connection closed by remote host

I've Googled around based on the error text, but haven't found anything specific to Lion. I've tried the solutions offered for other systems that I could find the equivalent for.
 
I found that my Remote Desktop connections were being refused after upgrading to Lion. No amount of restarting or troubleshooting worked.

Then, I went into the Sharing pane of the System Preferences, turned OFF Remote Desktop, then turned it back on.

That action kicked everything back into gear, and I can make Remote Desktop/VNC connections again.

Maybe simply turning off SSH login, then turning it back on would help?
 
No such luck. Even restarting the entire systems didn't help.

I have two systems running Lion 10.7.1. One is an Aluminum Mini at work, and the other is my own MacBook Pro.

I've regenerated the keys, emptied all the known_hosts and authorized_keys files, etc. But if the machines can't even connect to themselves??? That's damned strange.

Both are running MacPorts, and both have alternate SSH ports configured, which correspond to the gateway's forwarding. It worked in Leopard and Snow Leopard (I modified the existing SSH service in /etc/services, rather than create a second one), but could that be it? Is there some new file somewhere that needs to be changed?
 
I have both machines running SSH on alternate ports (for security reasons, and because of large networks); so I'd made changed to /etc/services. I changed the port rather than adding a service, so I left the daemon alone. It had worked from Leopard through Snow Leopard, but immediately broke in Lion.

It seems to be fixed since I removed the then-current copy of /etc/sshd_config, and replaced it from an original backup. I then changed back to the standard port and restarted SSH. It worked. I changed to the alternate port again, and it works once more.
 
Back
Top