0

I'm having a

ssh_exchange_identification: Connection closed by remote host

error when trying to ssh into my mac, from a linux VM

if I try with the verbose option I get this

ssh mac-user@192.168.1.11 -v
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.1.11 [192.168.1.11] port 22.
debug1: Connection established.
debug1: identity file /home/linux-user/.ssh/id_rsa type -1
debug1: identity file /home/linux-user/.ssh/id_rsa-cert type -1
debug1: identity file /home/linux-user/.ssh/id_dsa type -1
debug1: identity file /home/linux-user/.ssh/id_dsa-cert type -1
debug1: identity file /home/linux-user/.ssh/id_ecdsa type -1
debug1: identity file /home/linux-user/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/linux-user/.ssh/id_ed25519 type -1
debug1: identity file /home/linux-user/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2

I don't know what could be wrong, firewall options are ok.

Searching the web I found a temporary solution, disabling the "remote session" option and then using this command:

sudo $(which sshd) -Dd

Don't think its a propper answer.

This problem started when updating to Yosemite OSX.

Apreciate the help.

3 Answers 3

0

config.vm.boot_timeout - The time in seconds that Vagrant will wait for the machine to boot and be accessible. By default this is 300 seconds. (got this from) ServerFaqs

I'd increase this until you are able to vagrant ssh in.

1
  • sorry the link you gave me doesn't seem to have the answer, and not really sure what you mean by vagrant. I had no problems with this until the Yosimite update.
    – Miguel
    Nov 5, 2014 at 23:22
0

I solved this using brew to install openssh. Then change /System/Library/LaunchDaemons/ssh.plist file to use sshd provided by brew. A better explanation is here: https://stackoverflow.com/questions/10658950/upgrade-openssh-on-os-x-with-homebrew-for-pci-compliance

-1

I had the same problem. I deleted everything from SystemPrefereces->Security->Firewall and removed all services from SystemPreferences->Shared. Then I enabled remote login again. That fixed the problem in my case.

1
  • I deactivated the firewall but the problem persisted...
    – Miguel
    Nov 5, 2014 at 23:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .