我无法使用id_rsa在virtualbox中使用打包器创建OVA。我可以使用相同的私钥从主机将SSH转换到vbox主机。错误如给定
“等待SSH时出错:ssh:握手失败:ssh:无法 验证,尝试的方法[无公钥],没有受支持的方法 使用“
ssh_password
”成功创建了OVA。但是 我的目标是使用私钥创建OVA。
{
"builders": [{
"type": "virtualbox-ovf",
"source_path": "/root/Documents/OVA_idrsa.ova",
"ssh_username": "support",
"ssh_private_key_file": "id_rsa",
"ssh_pty": "true",
"ssh_port": 22,
"vrdp_bind_address": "0.0.0.0",
"guest_additions_mode": "disable",
"virtualbox_version_file": "",
"headless": true,
"ssh_skip_nat_mapping": "true",
"boot_wait": "120s",
"ssh_wait_timeout": "1000s",
"shutdown_command": ""
}]
}
我尝试改用ssh_password
。成功了。但是对于private_key文件,这个问题经常发生。
{
"builders": [{
"type": "virtualbox-ovf",
"source_path": "/root/Documents/OVA_idrsa.ova",
"ssh_username": "support",
"ssh_private_key_file": "id_rsa",
"ssh_pty": "true",
"ssh_port": 22,
"vrdp_bind_address": "0.0.0.0",
"guest_additions_mode": "disable",
"virtualbox_version_file": "",
"headless": true,
"ssh_skip_nat_mapping": "true",
"boot_wait": "120s",
"ssh_wait_timeout": "1000s",
"shutdown_command": ""
}]
}
错误:
“等待SSH时出错:ssh:握手失败:ssh:无法 验证,尝试的方法[无公钥],没有受支持的方法 保持”