Vagrant: ssh_exchange_identification: read: Connection reset by peer

Created on 22 Jan 2017  ยท  5Comments  ยท  Source: hashicorp/vagrant

Please note that the Vagrant issue tracker is reserved for bug reports and
enhancements. For general usage questions, please use the Vagrant mailing list:
https://groups.google.com/forum/#!forum/vagrant-up. Thank you!

Vagrant version

Run vagrant -v to show the version. If you are not running the latest version
of Vagrant, please upgrade before submitting an issue.
Vagrant 1.8.1

Host operating system

This is the operating system that you run locally.
CentOs 7

Guest operating system

This is the operating system you run in the virtual machine.
Ubuntu

Vagrantfile

# Copy-paste your Vagrantfile here

Vagrant.configure(2) do |config|
config.ssh.private_key_path = "~/.ssh/id_rsa"
config.ssh.forward_agent = true
config.vm.box = "hashicorp/precise32"
end

Please note, if you are using Homestead or a different Vagrantfile format, we
may be unable to assist with your issue. Try to reproduce the issue using a
vanilla Vagrantfile first.

Debug output

Provide a link to a GitHub Gist containing the complete debug output:
https://www.vagrantup.com/docs/other/debugging.html. The debug output should
be very long. Do NOT paste the debug output in the issue, just paste the
link to the Gist.

Expected behavior

What should have happened?
Success login to Virutal Box

Actual behavior

What actually happened?
[root@chefworkstation dockerworkstation]# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/precise32' is up to date...
==> default: VirtualBox VM is already running.
[root@chefworkstation dockerworkstation]# vagrant ssh
ssh_exchange_identification: read: Connection reset by peer

I've been working on this issue since last two days, I could not resolve it. Can anyone help me

Steps to reproduce

1.
2.
3.

References

Are there any other GitHub issues (open or closed) that should be linked here?
For example:

  • GH-1234
  • ...

Most helpful comment

vagrant halt
then
vagrant up
then vagrant ssh

All 5 comments

@gitexpert

What happen if you do this:

mkdir precise32
cd precise32
vagrant init -m hashicorp/precise32
vagrant up

does work ?

the line config.ssh.private_key_path = "~/.ssh/id_rsa" is not needed.

vagrant use an internal known key to ssh, and on first boot will replace with an autogenerated one.

thanks

vagrant halt
then
vagrant up
then vagrant ssh

Just to put my 5 cents here.
I stepped into the same pitfall.
The "vagrant ssh" was entered into an existing Powershell window. Formerly I entered
$Env:VAGRANT_PREFER_SYSTEM_BIN += 0
to redirect Vagrant in using the own SSH.EXE instead of Windows SSH.EXE.
This is obviously causing the problem.
After closing the Powershell window and open a new Powershell window all commands worked well.

vagrant halt
then
vagrant up
then vagrant ssh

@PranavMonotype What was the root cause for you?

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings