我有这个“centos/7”盒子的迷走片
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network :private_network, ip: "192.168.33.10"
config.vm.synced_folder ".", "/home/vagrant"
config.vm.provision "shell", path: "./conf/bitrix-env.sh"
config.vm.boot_timeout = 100
config.vm.provider :virtualbox do |vb|
vb.gui = true
vb.memory = "1024"
end
end迷航器up -命令工作正常,但是在我尝试启动迷航器之后,在准备中的脚本没有安装,但是出现了一个错误:
SSH is getting permission denied errors when attempting to connect
to the IP for SSH. This is usually caused by network rules and not being
able to connect to the specified IP. Please try changing the IP on
which the guest machine binds to for SSH.我怎样才能解决这个问题并安装所有的设备?
发布于 2018-05-17 13:51:25
这个问题是由于您的迷走神经文件中的下面一行所致。
config.vm.synced_folder '.', '/home/vagrant' 迷航用户的authorized_keys文件位于迷幻剂机器内的/home/迷走区/. ssh中,这使得可以将ssh放入迷航器框中。
当您将当前目录挂载到/home/流浪者时,/home/迷航器的所有内容都会被重写,并且没有授权的密钥文件。
将挂载路径更改为除/home/流浪者以外的任何内容,您将能够将ssh放到机器中。作为例子
config.vm.synced_folder '.', '/home/vagrant/somepath' https://stackoverflow.com/questions/50391655
复制相似问题