Skip to content

Commit

Permalink
fix ssh connection error in terraform smoke
Browse files Browse the repository at this point in the history
error:

"ssh: handshake failed: ssh: unable to authenticate, attempted methods
[none publickey], no supported methods remain"

Signed-off-by: Rui Yang <ruiya@vmware.com>
  • Loading branch information
Rui Yang committed Aug 24, 2022
1 parent a917395 commit cca0232
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions deployments/smoke/smoke.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ resource "google_compute_instance" "smoke" {
sshKeys = "root:${file("keys/id_rsa.pub")}"
}

connection {
type = "ssh"
host = google_compute_address.smoke.address
user = "root"
private_key = file("keys/id_rsa")
}

provisioner "remote-exec" {
connection {
type = "ssh"
host = google_compute_address.smoke.address
user = "root"
private_key = file("keys/id_rsa")
}

inline = [
"set -e -x",
"[ -e /var/lib/cloud ] && until [ -f /var/lib/cloud/instance/boot-finished ]; do sleep 1; done",
Expand Down

0 comments on commit cca0232

Please sign in to comment.