Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Laravel 4 Basics Getting Started with Laravel Installing Laravel Homestead

Vagrant SSH: ssh_exchange_identification: read: Connection reset by peer

I'm unable to log in to Vagrant using SSH. When I run vagrant ssh from inside the Homestead directory, I get the error message ssh_exchange_identification: read: Connection reset by peer.

There's also a Connection timeout error when I run vagrant up. I use Ctrl + C to cancel the vagrant up command due to these errors. I'm running Ubuntu 14.04 on my computer. Here's the output from my terminal:

y@y-ThinkPad-T420s:~/Homestead$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 80 => 8000 (adapter 1)
    default: 3306 => 33060 (adapter 1)
    default: 5432 => 54320 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
^C==> default: Waiting for cleanup before exiting...
Vagrant exited after cleanup due to external interrupt.
y@y-ThinkPad-T420s:~/Homestead$ vagrant ssh
ssh_exchange_identification: read: Connection reset by peer
Shane McC
Shane McC
3,005 Points

Did you ever figure this out? I'm getting the same error myself

Yeah. The problem was caused by virtualization being disabled in my computer's BIOS.

Shane McC
Shane McC
3,005 Points

Interesting. I'm curious, how did you go about fixing it?

I did the following:

  1. I restarted my computer.
  2. Before the operating system started up, I followed the onscreen instructions to enter the BIOS.
  3. I found the option to enable virtualization under the "Security" section.
  4. I enabled virtualization.
  5. I saved and exited BIOS.
  6. The operating system loaded, and I could now run "vagrant up" without any errors.

I hope this helps.

Shane McC
Shane McC
3,005 Points

Hi

Thanks, I followed your instructions but my computer dosen't have the "virtualization" option. Any tips on maybe where it is?

http://tinyurl.com/pypnflc http://scm22ri.smugmug.com/Other/BIOS/44847656_HSqcbM#!i=3597629985&k=mPbFc9b&lb=1&s=A

Not all computers have the option to disable virtualization. But you could try performing a web search for "[computer model] virtualization" or "[computer model] virtualization bios".

If your computer doesn't have this option, your problem is probably caused by something else.