(tramp and ssh) require a password

my Vagrantfile:

Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty32"
config.vm.box_check_update = false
config.vm.network "forwarded_port", guest: 3000, host: 3000
config.vm.synced_folder "./synced/", "/home/vagrant/"
config.ssh.private_key_path = "~/.ssh/id_rsa"
config.ssh.forward_agent = true

config.vm.provider "virtualbox" do |vb|
    vb.memory = "1024"
    vb.name = "test Ubuntu 14.04 box"
end
end

When i try to execute

vagrant ssh

ssh requires a password.

But Vagrant must use my local ssh key and does not require a password.

+3
source share
1 answer

I ran into the same problem. The problem is that you are trying to sync the guest home folder. I found a solution here , please refer to this post for more information. You need to change the synchronization paths.

Instead

config.vm.synced_folder "./synced/", "/home/vagrant/"

make

config.vm.synced_folder "./synced/", "/home/vagrant/mySyncFolder"
+1
source

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


All Articles