A
A
Arseny Sokolov2016-08-14 14:34:43
Vagrant
Arseny Sokolov, 2016-08-14 14:34:43

Why won't vagrant connect after changing the key?

I’m making a box for a vagrant, but I don’t understand why nothing works, it displays the following:

==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: bitrixtest_default_1471174192838_67476
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Remote connection disconnect. Retrying...
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...

It can be seen from the log that the vagrant first successfully connected with a non-secure key, then changed it and everything, of course, was a stupor. Why???

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arseniy Sokolov, 2017-02-16
@ArsenBespalov

I forgot about my question, in my case it turned out that when Vagrant changes the temporary key, it does not correctly indicate the access rights to the new key, and CentOS refuses to authorize anyone by keys with incorrect access rights to the key file, that's the whole snag.
And as I found out in practice, Vagrant has had such a problem for a long time and hasn’t been fixed in any way, maybe it’s been fixed now. And Vagrant works well only with Ubuntu.

M
Maxim Kovalev, 2017-02-15
@c0nstruct0r

In my case, just restarting vagrant helped

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question