Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

4,999 views
Skip to first unread message

Fredipus Rex

unread,
Mar 14, 2018, 1:02:11 PM3/14/18
to Vagrant
Hi,

I'm brand new to Vagrant and attempting to get a CentOS/7 box running within a VirtualBox on Windows 10 Pro (Build 1709, Fall Creators Update).

I am using Vagrant 2.0.2 and VirtualBox 5.2.8 and the box is the standard centos/7 box. I'm also using the vagrant-vbguest plugin.

I can't get it to run at all on one development box (it times out on the SSH authentication - the VirtualBox is created and running but 'vagrant up' hangs at the SSH auth method line and times out).

On my other box, it will perform the entire vagrant up process successfully, but returns the following when I attempt to do a vagrant ssh:

vag...@127.0.0.1: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Results of vagrant ssh-config:

Host default
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile E:/vagrant-boxes/.vagrant/machines/default/virtualbox/private_key
  IdentitiesOnly yes
  LogLevel FATAL

Contents of Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
end


Any ideas?

Alvaro Miranda Aguilera

unread,
Mar 15, 2018, 4:03:50 AM3/15/18
to vagra...@googlegroups.com
some boxes doesn't have virtualbox guest installed, the plugin vagrant-vbguest does a good job but sometimes is not enough

the best is you use a different box, either use other or build your own one.

can you test with this box:



--
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/6a11e13f-7320-45e9-bf75-826a0a89cf3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

W H

unread,
Mar 16, 2018, 7:37:38 AM3/16/18
to Vagrant
Hi
We had the same problem yesterday.
Using the command "vagrant ssh -- -vvv" you can discover more about the permission issue in the log.
The permission issue with "vagrant ssh" on the windows environment is normally because the private_key file created during "vagrant up" has more than one permitted user.
Please check the security permissions of  the "private_key" file. It should only have you as a user in the list of permitted users/groups.
Only in that case, shh accepts the private_key file as really private.
If you change the permissions, "vagrant ssh" should work.
As this has to be performed after every "vagrant up", you could consider change the permission settings of - in your case - the directory "vagrant-boxes".
Use for instance the windows line-command "E:> icacls vagrant-boxes /inheritance:r /grant <your user name>:(OI)(CI)F"
Kind regards
Weit

Fredipus Rex

unread,
Mar 19, 2018, 5:48:11 PM3/19/18
to vagra...@googlegroups.com
Thanks. I ended up choosing a different box (bento/centos-7) and it worked fine. The centos/7 box seems more than a little touchy - the page for it lists an endless stream of gotchas, including specific versions of vagrant, VirtualBox, plugins, etc.

bento/centos-7 just worked.

--
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 a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/xnWY2Om5C3Y/unsubscribe.
To unsubscribe from this group and all its topics, 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/aa62fdcf-086b-41d8-ac89-432c7fda1430%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages