如何在terraform上通过pageant建立SSH连接?我正在尝试使用在SSH连接上运行的文件置备程序来置备文件。根据docs的说法,在windows上,只有受支持的ssh代理是Pageant,但它没有解释如何配置它。
https://www.terraform.io/docs/provisioners/connection.html
即使在将PuTTY的目录添加到路径env var (包含在GitExtension中)之后,terraform似乎也没有检测到这一点,并且始终无法建立SSH连接。通过plink.exe连接可以正常工作,所以我的SSH被正确地添加到了Pageant中。
plink core@<ip-address-of-host>当我像这样直接传递private_key的内容时,File provisioner可以工作,但这不是我想要的。
connection {
type = "ssh"
host = aws_instance.instance.public_ip
user = "core"
agent = false
private_key = file(var.private_key_path)
}发布于 2019-11-10 00:34:35
您必须将agent parameter设置为true
agent -设置为false可禁用使用ssh-agent进行身份验证。在Windows上,唯一支持的SSH身份验证代理是Pageant. agent = truehttps://stackoverflow.com/questions/58779998
复制相似问题