-
Notifications
You must be signed in to change notification settings - Fork 3
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
Updating the Vagrant box breaks SSH key authentication #44
Comments
I second this issue. Happened to me with |
This is still the case with our latest image:
Users need to I guess it is a "feature" of Vagrant. Can we try to make some sort of workaround? |
We can just toggle off the feature if we want to go the easy way ( Issue seems to be that when Vagrant first starts up, well-known public key gets replaced with instance-specific key. Private part of this key get stored to Hypothesis above should/could be confirmed by examining |
This is a known issue inherited from upstream. Vagrant by default always uses the same keys globally, which is very insecure, and if keys are recreated per box then there is no reliable method to retain them across box updates. Also, in some cases network issues or others will result in the SSH step being stuck. Verbose explanation of this upstream feature in Finnish:
|
As a decent quick fix, the following should work. Copy the old
Then edit After this new and old projects should work painlessly. |
So apparently ..however I haven't been able to reproduce this issue for a long time, so it is a bit difficult to test if a fix works or not since there is no known test case i.e. way to reproduce this bug. |
If you read my previous comment two years ago, this would've been apparent, well, two years ago :D Glad to hear this doesn't seem to be causing issues anymore, I can't really say as I haven't been using this for a while now. |
The issue was not assigned to me 2 years ago, so I did not follow up it in detail then. I apologize this didn't get proper attention back then. |
I have not been able to reproduce this for a while, so I don't have a case where to test potential fixes. |
WIP fix: Seravo/wordpress@0ffdb1e |
If one runs
vagrant up
for an existing project aftervagrant box update
was run, one will not be able to access the box anymore due to mismatch in SSH keys:The workaround is to run
vagrant destroy; vagrant up
but it seems stupid. Investigate how and where the SSH key is generated, and how we could save it and reuse if permanently to avoid this situation in the future.The text was updated successfully, but these errors were encountered: