terraform是否支持ssh密码保护密钥?

时间:2017-04-04 03:32:17

标签: ssh-keys terraform

我试图在这里使用此配置:

response.render("Category", {
    message: posts,
    userList: usernames
});

我有错误:

connection {
    type = "ssh"
    user = "root"
    agent = true
    private_key = "${file("~/.ssh/id_rsa")}"
}

我还试图删除password protected keys are not supported. Please decrypt the key prior to use. 参数。它只需要从ssh-agent读取密钥,但它不起作用。 Terraform版本为private_key

1 个答案:

答案 0 :(得分:0)

好。解决了。问题是未指定ssh_keys指纹,因此在未指定任何ssh密钥的情况下创建了vm。但错误本身是非常误导的。

所以只需添加:

resource "digitalocean_droplet" "mydroplet" {
   ssh_keys = [
      "<fingerprint can be found in digital ocean ssh keys tab>"
   ]
}
相关问题