在OCI云shell中尝试连接到linux服务器时,获取terraform代码中的错误。
resource "null_resource" "remote-exec" {
provisioner "remote-exec" {
connection {
agent = false
timeout = "10m"
host ="xx.xx.x.x"
user = var.host_user_name
private_key =file("${path.module}/integerebspvtkey.ssh.ppk")
}
inline = [
...
]
}
}
variable "host_user_name"{
default="opc"
}integerebspvtkey.ssh.ppk是在运行terraform的同一个目录中显示的私钥。
发布于 2022-02-22 05:51:49
基于这些评论。
问题是格式错误的密钥。而不是ppk,它应该是pem。
https://stackoverflow.com/questions/71212371
复制相似问题