-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vagrant documentation about default insecure key should be updated #5059
Comments
I came accross this #4707 which I guess answers my question. I think it should be clearly documented somewhere on the website. |
And #5005 |
You simply need to add What would you propose as an enhancement for the documentation? |
Thanks, The documentation says: About About Which are both misleading IMHO. I eventually found out the change in https://github.com/mitchellh/vagrant/blob/master/CHANGELOG.md , but it's not marked as "Breaking change". Considering this workflow has been around for a long time (so you have lots of resources available which reference this behaviour), I think it should be clearly stated in the documentation that it was changed in 1.7. |
Thanks @gou1 for the good catches :) I agree that some "as of Vagrant 1.7" is missing, and that the @mitchellh @sethvargo I renamed the issue title and tagged as "docs" issue. @gou1 are you willing to propose a pull request? (just to know if somebody else should take on the job ;-) |
Note that your initial question (How to force the use of the default insecure key?) has been answered. |
(@gou1 Oh, I see that you've just updated your previous comment, and it is good to know that it works for you |
Sure I can do a PR, I'll try to submit it within a week! |
@gou1 THANKS 💓 |
After updating to vagrant 1.7.1, Demonstration of manual ssh using all the same parameters working, but
I understand that the vagrant-insecure-key path is no longer correct for the latest version. (or is it correct until the newly created public key is copied in for |
this could be due to needing to use an ssh agent for a passphrase-protected key, and something related to that changing... I'm on OS X btw... sorry to pollute this issue with unrelated comments |
Hi, I have a problem with running laravel/homestead due to this automatic insertion of secure keys. I should not be editing the vagrant file as it is part of the source for homestead. Somehow 'homestead ssh' works but is very slow so I would like to continue using plain old ssh from the cli
But now when I do this I get the following message.
Where can I find the correct key to add to the known hosts file? |
It is in ~/.ssh/known_hosts |
This issue is not about For hostnames / ip addresses which you expect to change identity (new VM, new ssh host key generated inside the VM), you can use the ssh config options which vagrant does for "vagrant ssh":
|
Thanks for the reply but I'm not understanding. According to the message I get from using ssh the problem is that the correct host key is not in the known_hosts file. So how do I get the correct host key so I can manually insert it into the known_hosts file? vagrant ssh-config does not work because there is no vagrantfile. Even if I cd to the directory where the vagrant file exists "C:\Users\lotus\AppData\Roaming\Composer\vendor\laravel\homestead" I get the following message
I get the same message if I first do homestead up to start up the machine. But I still don't see what vagrant ssh-config has to do with me using plain old ssh like
|
What you need to do now is remove the key for host "127.0.0.1" in your known_hosts. I wasn't suggesting using "vagrant ssh-config", just using the ssh config options which "vagrant ssh" uses. I ran "vagrant ssh-config" to show how I knew of them. Those two options I pointed out cause ssh to not use known_hosts, which is appropriate in this case. You should research how to configure ssh (you'll probably want to edit |
Thanks @ploxiln . Sorry I misunderstood. I removed the local host entry and then when I used ssh again it added it back to the known_hosts file with the correct rsa key on the first time and now works as it should. Also 'homestead ssh' which calls 'vagrant ssh' still works so all is good. I agree that I need to research ssh config options but also think this should be added to documentation. Basically if user has a basic default ssh setup using openssh (at least on Windows systems) the known_hosts file will be used by default and the current entry for 127.0.0.1 will be incorrect because vagrant changed it so that entry will need to be deleted and re-created again in order for plain old ssh connections to work. |
This should be fixed now! We now honor |
Since there is a lot of participation on this issue, I am going to lock the thread to prevent additional issues from being reported as comments. If you are using Vagrant 1.7.3 and still have errors with the generated SSH private key, please open a new issue on the issue tracker. Thank you! 😄 |
Hi,
Vagrant supposedly uses the same insecure private key by default, which allows for easy ssh to the VMs. But lately vagrant has been replacing my private key when booting a VM.
Here's my setup:
Here's my Vagrantfile:
And when i run
vagrant up
i get:How to force the use of the default insecure key? On Windows, because "vagrant ssh" is not pratical to use, the typical workflow is to have a putty session for vagrant boxes. Having a newly generated key per box hinders this.
The text was updated successfully, but these errors were encountered: