MacOS – Can’t establish a ssh connection to the Mac OSX Yosemite

macosssh

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.

Best Answer

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.