Vagrant ssh 'private_key_path` 文件必须存在 [英] Vagrant ssh 'private_key_path` file must exist
本文介绍了Vagrant ssh 'private_key_path` 文件必须存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 vagrant up 时遇到这个错误
I'm getting this error during vagrant up
There are errors in the configuration of this machine. Please fix
the following errors and try again:
SSH:
* `private_key_path` file must exist: insecure_key
如何设置私钥以便通过 ssh 使用 vagrant ssh?我使用的是 Windows 7.
How do I setup the private key in order to ssh into use vagrant ssh? I'm using Windows 7.
我的流浪档案
Vagrant.configure("2") do |config|
config.vm.define "phusion" do |v|
v.vm.provider "docker" do |d|
d.cmd = ["/sbin/my_init", "--enable-insecure-key"]
d.image = "phusion/baseimage"
d.name = 'dockerizedvm'
d.has_ssh = true
#d.force_host_vm = true
end
v.ssh.port = 22
v.ssh.username = 'root'
v.ssh.private_key_path = 'insecure_key'
v.vm.provision "shell", inline: "echo hello"
#v.vm.synced_folder "./keys", "/vagrant"
end
end
推荐答案
insecure_key
应该是一个包含 SSH 密钥的文件.该文件应位于您vagrant up
所在的同一文件夹中.以下是另一种选择:
insecure_key
should be a file containing an SSH key. The file should be in the same folder where you vagrant up
. The following is an alternative:
curl -o insecure_key -fSL https://github.com/phusion/baseimage-docker/raw/master/image/insecure_keychmod 600 insecure_key无业游民ssh
这篇关于Vagrant ssh 'private_key_path` 文件必须存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文