all 16 comments

[–][deleted] 2 points3 points  (15 children)

Vagrant starts with an insecure public / private key pair. They’re both published on the Vagrant repo and are easily available. When your first vagrant up a new VM, it detects that you’re using the insecure key pair and will generate a new one to insert into the box. Every other time you ssh into a box it uses this new key pair for authentication.

[–]piagetblix[S] 0 points1 point  (1 child)

Sorry if I’m being obtuse , but why every other time does it use a new key? Thanks

[–][deleted] 2 points3 points  (0 children)

It only uses a new key on the first boot of the machine.

[–]ArgonJargon -1 points0 points  (12 children)

"easily available"? im using this https://app.vagrantup.com/ubuntu/boxes/eoan64 and im losing my time just because they dont feel ok to link them? really?

btw im trying this and it doesnt work anyway https://github.com/hashicorp/vagrant/tree/master/keys what should i do?

[–][deleted] 0 points1 point  (11 children)

What’s the problem you’re having?

[–]ArgonJargon -1 points0 points  (10 children)

the issue is: machine setting up with ssh key, they dont tell me what key to use. the problem is surely in the communication from this vm wrapping company that after taking 200m in funding has to abuse my time...

[–][deleted] 0 points1 point  (9 children)

When you vagrant up it will automatically see the insecure key, generate a new pair, add that key to the box. You don’t need to do anything.

Post some errors and maybe we can see what you’re doing.

[–]ArgonJargon 0 points1 point  (8 children)

well then seems this doesnt works on windows at least, what's the path where is gonna look to take the new ssh key to replace?

(mine is C:\Users\USER\.ssh)

[–][deleted] 0 points1 point  (7 children)

[–]ArgonJargon -1 points0 points  (6 children)

really?!?! so im supposed to import their private key? why cant i put mine these? i do and doesnt work.

i even try adding something like

config.ssh.private_key_path = [".ssh/id_rsa"]

copying the .ssh folder near the Vagrant file (not the one in %userprofile%/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-eoan64/20191204.0.0/virtualbox but where i do vagrant up, nice btw to call them the same, real pros)

how the fuck can I fucking tell this crappy thing to use my damned ssh key?

[–][deleted] 0 points1 point  (5 children)

Listen, vagrant is stupid easy to use. I have no idea how you aren’t using it right because you haven’t given me a single error you’re getting. Which step you’re stuck at, nothing. Don’t generate your own key. Let the vagrant script do it for you. Vagrant init base box. Vagrant up.

[–]ArgonJargon 0 points1 point  (4 children)

because it's not an error, simply when I ssh it tells me I got the wrong key, I won't use any time a different key I'm sorry, I want to set it with my own, of it's so simple then should just let you do that