Skip to content

Commit

Permalink
Fix SSH issue with in place upgrades. (#247)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
k4leung4 authored and k8s-ci-robot committed Jun 1, 2018
1 parent a3b3910 commit 1f11e62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloud/google/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 1f11e62

Please sign in to comment.