Reputation: 81
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 execute
vagrant ssh
ssh requires password.
But Vagrant should use my local ssh key and do not require password.
Upvotes: 3
Views: 1449
Reputation: 767
Do you have the line like below in your ~/.ssh/config
?
PubkeyAcceptedKeyTypes ssh-dss,ssh-rsa
In my case, after removing this line, vagrant ssh
stopped asking me for password.
Upvotes: 0
Reputation: 500
I've faced the same issue. The problem is you're trying to synch into guest's home folder. I've found the solution here, please refer to that post for more info. You need to change your synch paths.
Instead of
config.vm.synced_folder "./synced/", "/home/vagrant/"
do
config.vm.synced_folder "./synced/", "/home/vagrant/mySyncFolder"
Upvotes: 1