From 1f11e62bb326cf42469640c87f77fde6f44c3ade Mon Sep 17 00:00:00 2001 From: Kenny Leung Date: Fri, 1 Jun 2018 09:39:55 -0700 Subject: [PATCH] Fix SSH issue with in place upgrades. (#247) The master in-place upgrade is currently broken due to an SSH failure with the error "Host key verification failed." As the master machine may change, it should be safe to disable the host key check, which fixes the issue. --- cloud/google/ssh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/google/ssh.go b/cloud/google/ssh.go index 24b3cbd06662..ceb4a555df7a 100644 --- a/cloud/google/ssh.go +++ b/cloud/google/ssh.go @@ -108,7 +108,7 @@ func (gce *GCEClient) remoteSshCommand(cluster *clusterv1.Cluster, machine *clus } command := fmt.Sprintf("%s", cmd) - c := exec.Command("ssh", "-i", gce.sshCreds.privateKeyPath, "-q", gce.sshCreds.user+"@"+publicIP, command) + c := exec.Command("ssh", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-i", gce.sshCreds.privateKeyPath, "-q", gce.sshCreds.user+"@"+publicIP, command) out, err := c.CombinedOutput() if err != nil { return "", fmt.Errorf("error: %v, output: %s", err, string(out))