{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/5005","labels_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5005/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5005/comments","events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5005/events","html_url":"https://github.com/mitchellh/vagrant/issues/5005","id":52221139,"number":5005,"title":"Feature request: add a global public key insertion","user":{"login":"bartmeuris","id":2588174,"avatar_url":"https://avatars.githubusercontent.com/u/2588174?v=3","gravatar_id":"","url":"https://api.github.com/users/bartmeuris","html_url":"https://github.com/bartmeuris","followers_url":"https://api.github.com/users/bartmeuris/followers","following_url":"https://api.github.com/users/bartmeuris/following{/other_user}","gists_url":"https://api.github.com/users/bartmeuris/gists{/gist_id}","starred_url":"https://api.github.com/users/bartmeuris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartmeuris/subscriptions","organizations_url":"https://api.github.com/users/bartmeuris/orgs","repos_url":"https://api.github.com/users/bartmeuris/repos","events_url":"https://api.github.com/users/bartmeuris/events{/privacy}","received_events_url":"https://api.github.com/users/bartmeuris/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/vagrant/labels/waiting-reply","name":"waiting-reply","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-12-17T10:02:18Z","updated_at":"2015-10-03T02:37:56Z","closed_at":null,"body":"## Intro\r\nSince Vagrant 1.7, if it detects the insecure SSH key on a box when bringing it up, it removes the key and generates a new-one specific for that box.\r\n\r\nSecurity-wise, this is a good thing, although because 99% of these boxes probably run in development environments and because vagrant environments are very volatile, security is not as high as practicality on my list of priorities. It is still important though.\r\n\r\n## The problem\r\n\r\nThe problem with this change in 1.7.x is that it impacts practicality a lot, certainly in a Windows environment. I suspect most people won't use `vagrant ssh` there (I don't) because of the horrible Windows console with a hacky terminal emulation, where resizing (even with stuff like Console2)  brings you a world of pain. I suspect most people will fall back to PuTTY or another SSH client to connect to their boxes, and while it's not perfect, it works.\r\n\r\nThis change of removing the 'insecure' ssh key in combination with PuTTY (or any other external ssh client) becomes problematic:\r\n\r\n- PuTTY does not understand OpenSSH keys directly, you have to convert them for each and every box.\r\n- You have to know the path and provider of the box you're trying to connect to to load (or convert) the key if you're trying to automate this (this was my initial thought)\r\n- external provisioning scripts using ssh (which I have for various reasons), suddenly need more info than just the port they need to connect to.\r\n\r\n## Proposed solution\r\n\r\nTherefor I propose the following: Add a central configuration option where you specify public keys that should be injected into the VM when it detects they are missing, just like the insecure keys are detected and new-ones are inserted.\r\n\r\nThis offers the following:\r\n\r\n- this does not impact security any more than the current private key generation\r\n- allows people to use their own private keys to connect to their vagrant boxes, and can easily load them in a key-agent, or configure their ssh profiles to use their own private key.\r\n- Vagrant does not need to know the private keys, it can still use it's own privately-generated-ones to communicate with the box.\r\n\r\nI think this offers best of both worlds, I hope this will be considered."},"comment":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/comments/145194811","html_url":"https://github.com/mitchellh/vagrant/issues/5005#issuecomment-145194811","issue_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5005","id":145194811,"user":{"login":"ccope","id":412019,"avatar_url":"https://avatars.githubusercontent.com/u/412019?v=3","gravatar_id":"","url":"https://api.github.com/users/ccope","html_url":"https://github.com/ccope","followers_url":"https://api.github.com/users/ccope/followers","following_url":"https://api.github.com/users/ccope/following{/other_user}","gists_url":"https://api.github.com/users/ccope/gists{/gist_id}","starred_url":"https://api.github.com/users/ccope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccope/subscriptions","organizations_url":"https://api.github.com/users/ccope/orgs","repos_url":"https://api.github.com/users/ccope/repos","events_url":"https://api.github.com/users/ccope/events{/privacy}","received_events_url":"https://api.github.com/users/ccope/received_events","type":"User","site_admin":false},"created_at":"2015-10-03T02:37:55Z","updated_at":"2015-10-03T02:37:55Z","body":"+1 for adding an option to specify an additional public key(s) to insert into the VM. Our users need to have persistent keys for their VM's, but we also cannot leave the vagrant public key due to security issues."}}