Vagrant ssh promtps for password

I have a strange problem with vagrant ssh. Similar questions, for example, Vagrant asks for a password after updating the SSH key or (stroller and ssh) require a password , or Vagrant ssh authentication error does not help me.

So the plot.

I have a virtual machine with Ubuntu 14.04.3. All settings were made in accordance with this article: https://blog.engineyard.com/2014/building-a-vagrant-box .

Note. I can use ssh for this virtual machine using Putty with vagrant insecure_private_key (converted to * .ppk), which is located at "C: /Users/Gino/.vagrant.d/insecure_private_key". Password is not executed.

Then I packed this virtual machine, initiated vagrant with this package and started vagrant up. I got an error " Warning: Authentication failure. Retrying...". Nevertheless, I could vagrant sshon this machine, but he asked me for a password. And if I tried sshusing Putty with the necessary key (as in the first paragraph), he also asked me to enter a password.

I vagrant haltedited this machine, found it in the VM VirtualBox list, and started it manually. After that, I tried sshto put this machine using Putty with the same key and succeed - I could log in without any password.

Result vagrant ssh-config, if necessary:

h:\VagrantBoxes\main-server32>vagrant ssh-config
Host default
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile "C:/Users/Gino/.vagrant.d/insecure_private_key"
  IdentitiesOnly yes
  LogLevel FATAL

My Vagrantfile(it was generated automatically, almost nothing there, only the suggested line from the comments was added):

Vagrant.configure(2) do |config|
  config.vm.box = "vagrant-main-server32"

  config.ssh.insert_key = false
end

, ? ssh vagrant up ?

. : vagrant up. , " ", vm , vagrant up. vagrant ssh.

+4
2

1.8.1, , (: geerlingguy/centos6)

Vagrant 1.7 .

, ssh , , /home/vagrant 755 ssh

/var/log/secure:

. 28 15:11:36 sshd [11721]: : //

vm, /home/vagrant ( chmod 700 ), ssh

, . , .

, !

edit: , , /, /home/vagrant

+2

vagrant ?
, Vagrant, 'vagrant' , 'vagrant' .

0

Source: https://habr.com/ru/post/1622812/


All Articles