-
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
Newly generated key is empty #5219
Comments
@yves-vogl sorry you are having problems with the new key insertion. Just for posterity sake, what happens if you disable SELinux? |
I have the same problem too
Login in with password, I have to excute Use debian7 minimal, SELinux not enabled. |
SELinux did not cause this. The same happens with SLES 11.3
|
|
I'm seeing the same issue with RHEL and SELInux. Update: Update 2: |
I'm seeing this also on Oracle Linux 7.1. It seems like a pretty universal issue then with any RHEL 7 based system, as there are now reports of RHEL, CentOS 7, and OEL 7.1. |
Assuming your IP addresses are the same (check via
|
I was wrong. In fact I am seeing the same symptoms (constantly being told that the key is insecure and a new secure key has been successfully installed) but not because /home/vagrant/.ssh/authorized_keys is empty, but rather because it is over-full. The file contains two keys: the original insecure one and the new secure one. I see in the code (https://github.com/mitchellh/vagrant/blob/efd1d5e11bfc5a72c7a1d1eae294b4751d841544/plugins/guests/linux/cap/insert_public_key.rb) that the new secure key is appended to the authorized_keys file, and the insecure key is never removed. I created this box that I'm testing with, and followed instructions such as http://docs.vagrantup.com/v2/boxes/base.html which contains language such as:
However the code above clearly uses >> to append to authorized_keys and not >, and also doesn't look for and remove the insecure key. I'm left wondering if my base box should just skip this step, and what would happen? I'm also wondering , if I've followed this right, it hasn't shown up more generally for everybody. |
@rbair23 After adding the key successfully, it does remove it. I'll try to repro this with a Cent box. |
I'm seeing the same on CentOS 6 |
Seems linked to #5186 |
Same on Debian 8 Jessie |
Creating a new ubuntu/trusty64 VM works with the |
I have found the 1.7.2 to be very buggy in this particular area and in my google travels I have found the following to resolve almost all situations, assuming you don't need a secure user: config.ssh.username = "vagrant" This will completely overwrite the key implementation, but there are definitely a number of bugs associated with public/private keys in this vagrant version. Hope it helps. |
Has anyone done a root cause analysis so far? Maybe we should support @mitchellh more to get this issue solved. |
hey guys, any updates on this, we still seem to be running into this problem... anything i can do to help troubleshoot? |
This should be fixed by GH-6406. Thanks everyone! |
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. |
I'm booting a CentOS 7 machine with SELinux enabled.
It seems that the newly generated public key isn't inserted:
The text was updated successfully, but these errors were encountered: