ISSUE : Authentication failure. Retrying... after Key inserted!

1,047 views
Skip to first unread message

whats...@gmail.com

unread,
Aug 24, 2016, 2:56:01 PM8/24/16
to Vagrant
Hello,

OS : El Capitan

I got this issue when I vagrant up with cents 6.5.

Please help me... out.................

I tried... below things.. for this issue. but still doesn't work.

bash-3.2# vagrant ssh

vag...@127.0.0.1's password: 

Last login: Fri Mar  7 16:57:20 2014 from 10.0.2.2

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

[vagrant@localhost ~]$ wget https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -O ~/.ssh/authorized_keys

--2016-08-24 18:45:26--  https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub

Resolving raw.githubusercontent.com... 151.101.100.133

Connecting to raw.githubusercontent.com|151.101.100.133|:443... connected.

ERROR: certificate common name `www.github.com' doesn't match requested host name `raw.githubusercontent.com'.

To connect to raw.githubusercontent.com insecurely, use `--no-check-certificate'.

[vagrant@localhost ~]$ chmod 700 ~/.ssh

[vagrant@localhost ~]$ chmod 600 ~/.ssh/authorized_keys

[vagrant@localhost ~]$ chown -R vagrant:vagrant ~/.ssh



MY ISSUE...

bash-3.2# vagrant up

Bringing machine 'default' up with 'virtualbox' provider...

==> default: Importing base box 'centos'...

==> default: Matching MAC address for NAT networking...

==> default: Setting the name of the VM: juno_default_1472064511541_56111

==> 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: 

    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...

^C==> default: Waiting for cleanup before exiting...

Vagrant exited after cleanup due to external interrupt.



Chris Roberts

unread,
Aug 24, 2016, 3:10:14 PM8/24/16
to vagra...@googlegroups.com
Hi!

First destroy the existing instance:

vagrant halt --force
vagrant destroy

Next, in your Vagrantfile, disable the ssh key insertion:

config.ssh.insert_key = false

and then run:

vagrant up

If that doesn't resolve the issue, let me know.

Cheers!

--
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/3475e88a-6b24-4bf7-9435-f9c7259991fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

whats...@gmail.com

unread,
Aug 26, 2016, 1:07:49 AM8/26/16
to Vagrant
Hi!

It work!!

Thank you, Finally I can do more.

Thank you!!!

2016년 8월 25일 목요일 오전 4시 10분 14초 UTC+9, Chris Roberts 님의 말:
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.

Alvaro Miranda Aguilera

unread,
Aug 26, 2016, 3:14:03 AM8/26/16
to vagra...@googlegroups.com
Hello,

This workaround is needed due a bug in Vagrant 1.8.5, the permanent fix should be included in Vagrant 1.8.6

Thanks
Alvaro.

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/1c470b2e-dd9c-4e52-b49c-472888f131a3%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Stephan Hradek

unread,
Oct 24, 2016, 3:48:15 AM10/24/16
to Vagrant


Am Freitag, 26. August 2016 09:14:03 UTC+2 schrieb Alvaro Miranda Aguilera:
Hello,

This workaround is needed due a bug in Vagrant 1.8.5, the permanent fix should be included in Vagrant 1.8.6


I have the authentication problem with vagrant 1.7.4 (I can't use a newer one on my old OS X 10.6.8).

Changing the Vagrantfile as you described, didn't help.

Do you have any advice for me?
 

Alvaro Miranda Aguilera

unread,
Oct 24, 2016, 3:54:31 AM10/24/16
to vagra...@googlegroups.com
Can you try with this box?

mkdir precise64
cd precise64
vagrant init -m hashicorp/precise64
vagrant up

in case of error run this:

vagrant destroy
VAGRANT_LOG=DEBUG vagrant up 2>&1 | tee vagrant_up.log

and share a gist (gist.github.com) of the generated log file  vagrant_up.log

--
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.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Stephan Hradek

unread,
Oct 24, 2016, 5:37:43 PM10/24/16
to Vagrant
Will do it later.

In the meantime I think this could be due to a differing - for whatever reason - private key of my vagrant.

My workaround now is - in case anyone is interested:

ssh-keygen -y -f $(
  vagrant ssh
-config |
    perl
-ne '
 
    print if s/^\s*IdentityFile\s+//
    '

 
) |
  ssh vagrant@localhost
-p 2222 'cat >> .ssh/authorized_keys'

This will ask once for vagrant's password. After that, it'll put the public key into its place and vagrant ssh works.



Am Montag, 24. Oktober 2016 09:54:31 UTC+2 schrieb Alvaro Miranda Aguilera:
Can you try with this box?

mkdir precise64
cd precise64
vagrant init -m hashicorp/precise64
vagrant up

in case of error run this:

vagrant destroy
VAGRANT_LOG=DEBUG vagrant up 2>&1 | tee vagrant_up.log

and share a gist (gist.github.com) of the generated log file  vagrant_up.log
On Mon, Oct 24, 2016 at 9:48 AM, Stephan Hradek <stephan...@gmail.com> wrote:


Am Freitag, 26. August 2016 09:14:03 UTC+2 schrieb Alvaro Miranda Aguilera:
Hello,

This workaround is needed due a bug in Vagrant 1.8.5, the permanent fix should be included in Vagrant 1.8.6


I have the authentication problem with vagrant 1.7.4 (I can't use a newer one on my old OS X 10.6.8).

Changing the Vagrantfile as you described, didn't help.

Do you have any advice for me?
 

--
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+...@googlegroups.com.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages