hello

Say you you start with a working box.

lets say . hashicorp/precise64

you want to do something and then package, this is what I meant by
intermediate box

on this intermediate box, if you add config.ssh.insert_key = false it wont
change the ssh and the packaged box will be able to just use the same known
key

try to create a new box from a working base box using config.ssh.insert_key
= false

the new box should ssh and provision without problems

after that, you can just provision this intermediate box in the way you
require and then package it.

Hope this helps

Alvaro

On Mon, Aug 28, 2017 at 2:47 PM, James Newton <james.lexog...@gmail.com>
wrote:

> On Monday, 28 August 2017 14:59:52 UTC+3, Alvaro Miranda Aguilera wrote:
>>
>> THE Vagrant way is to add the known vagrant public ssh key, that will be
>> replaced on first on first boot.
>>
>> So, if you are starting with a box that you will repackage the best is to
>> add
>>
>> config.ssh.insert_key = false
>>
>> to that intermediate box, so the ssh key won't be replaced.
>>
>
> Hello Alvaro,
>
> Thank you for your reply. I must have misunderstood your instructions,
> because I have failed to get this to work.
>
>    - I added `config.ssh.insert_key = false` to the Vagrantfile for the
>    box that I subsequently package. (Is this what you call "that intermediate
>    box"?) I then created the package and added it to the Vagrant Install, then
>    created a new instance of the box from the package. However, I was still
>    asked for a password when I used `virtual ssh`.
>    - I manually added  `config.ssh.insert_key = false` to the Vagrantfile
>    for this new box, but again `virtual ssh` asked me for a password.
>
> I am guessing that the missing step is "add the known vagrant public ssh
> key", but I am not sure exactly what you mean by this. Where do I add what
> from where?
>
> Thanks in advance for any clues you can give me.
>
> James
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/vagrant-up/1f5c1731-9b14-4871-9cb6-6f3ce43e11fa%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/1f5c1731-9b14-4871-9cb6-6f3ce43e11fa%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0ewPkuM3_6O2rOO0wEtRh9a%2BrojNUry3t5w1bFhSkPcTRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to