Skip to content
This repository has been archived by the owner on Dec 12, 2019. It is now read-only.

SSH identity not passed from host to guest if running Vagrant >= 1.7.0 #116

Closed
dixhuit opened this issue Dec 16, 2014 · 4 comments
Closed
Labels
Milestone

Comments

@dixhuit
Copy link
Contributor

dixhuit commented Dec 16, 2014

Original issue title:

"ssh-add functionality no longer working after upgrade to Vagrant 1.7.1"

Steps:

  1. Upgrade to latest version of Vagrant (1.7.1)
  2. vagrant up
  3. vagrant ssh
  4. ssh-add -L
  5. Guest box will report that The agent has no identities.

I've also noticed that Sequel Pro is now asking me for the vagrant user's password (also vagrant) every time it wants to connect to a db via ssh (despite having access to Vagrant's insecure key).

Looking at Vagrant's changelog I'm guessing that this regression is related to a feature added in v1.7.0:

If the default insecure keypair is used, Vagrant will automatically replace it with a randomly generated keypair on first vagrant up. [GH-2608]

I'm gonna attempt to roll back to Vagrant 1.6.5 for now.

@dixhuit dixhuit added the bug label Dec 16, 2014
@dixhuit
Copy link
Contributor Author

dixhuit commented Dec 17, 2014

Downgraded to Vagrant 1.6.5 and I now have everything working again. That said, I did experience similar problems initially after the downgrade and it took some extra fiddling about to get things behaving:

  • Upgraded vagrant plugins
  • Rebuilt guest boxes that were displaying original symptoms
  • Debugged some internet connection issues that I happened to be having at the same time

As you can see, my original bug report could well be totally misdiagnosed :) I'll leave this open for now to see if anyone else reports anything similar - once we have more data we'll see about closing this issue or working on a fix.

@dixhuit dixhuit changed the title ssh-add functionality no longer working after upgrade to Vagrant 1.7.1 Comment here if you've got ssh-add/vagrant-triggers issues and are running Vagrant 1.7.0+ Dec 17, 2014
@philipnorton42 philipnorton42 added this to the 1.0 milestone Jan 21, 2015
@iAugur
Copy link

iAugur commented Jan 30, 2015

Vagrant was updated to not use the insecure key and generate a random key
So you can put the following in the Vagrant file and it will act as before:

  # since 1.7.0 Vagrant uses a random generated RSA key!! we don't want this
  config.ssh.insert_key = false

see hashicorp/vagrant#4707

@dixhuit
Copy link
Contributor Author

dixhuit commented Jan 30, 2015

Currently testing what happens if you add this line but are running Vagrant < 1.7.0 (I'm still running 1.6.5 due to this very issue!). Will post back with details so that we can get an appropriate fix in for this.

@dixhuit dixhuit changed the title Comment here if you've got ssh-add/vagrant-triggers issues and are running Vagrant 1.7.0+ SSH identity not passed from host to guest if running Vagrant >= 1.7.0 Jan 30, 2015
@dixhuit
Copy link
Contributor Author

dixhuit commented Jan 30, 2015

Vagrant 1.6.5 didn't seem to care so that saves us having to check the Vagrant version and possibly add a requirement for Vagrant 1.7+.

Fixed pushed, closing issue. Thanks for your help @iAugur !

@dixhuit dixhuit closed this as completed Jan 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants