From ca7c4424b50e833823fbaaba9703c3c38749177e Mon Sep 17 00:00:00 2001 From: Kenny Leung Date: Wed, 30 May 2018 14:31:49 -0700 Subject: [PATCH] Fix SSH issue with in place upgrades. 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))