Packaging a box deletes insecure private key

58 views
Skip to first unread message

marccaps

unread,
Jan 19, 2017, 1:17:53 PM1/19/17
to Vagrant
Hi,

I was trying to package a vagrant vm into a box so that I can use it for other projects. But vagrant keeps on deleting the insecure_private_key keypair that I added in the ~/.ssh/authorized_keys. I need that key so that I can easily ssh into the newly created machine using my custom box.

Is there any way to prevent vagrant from deleting the insecure_private_key and adding its own generated keypair?

Thanks,
Marc

Alvaro Miranda Aguilera

unread,
Jan 19, 2017, 1:54:09 PM1/19/17
to vagra...@googlegroups.com
on this box you need to use

config.ssh.insert_key = false

With that vagrant't wont replace the insecure key, and the package will work.

Other option is build your own boxes using packer.

Alvaro.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/36bdf1ab-467a-405d-a999-e1d73b2626e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages