{"record":{"id":"cf024e75c3088429","repo":"kubernetes/kops","slug":"computed-ssh-key-fingerprint-mismatch-q-q","errorCode":null,"errorMessage":"computed SSH key fingerprint mismatch: %q %q","messagePattern":"computed SSH key fingerprint mismatch: %q %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scalewaytasks/sshkey.go","lineNumber":75,"sourceCode":"\tif keysResp.TotalCount == 0 {\n\t\treturn nil, nil\n\t}\n\tif keysResp.TotalCount != 1 {\n\t\treturn nil, fmt.Errorf(\"found multiple SSH keys named %q\", *s.Name)\n\t}\n\n\tklog.V(2).Infof(\"found matching SSH key named %q\", *s.Name)\n\tk := keysResp.SSHKeys[0]\n\tsshKey := &SSHKey{\n\t\tID:                 new(k.ID),\n\t\tName:               new(k.Name),\n\t\tKeyPairFingerPrint: new(k.Fingerprint),\n\t\tLifecycle:          s.Lifecycle,\n\t}\n\n\t// Avoid spurious changes\n\tif !strings.Contains(fi.ValueOf(sshKey.KeyPairFingerPrint), fi.ValueOf(s.KeyPairFingerPrint)) {\n\t\treturn nil, fmt.Errorf(\"computed SSH key fingerprint mismatch: %q %q\", fi.ValueOf(s.KeyPairFingerPrint), fi.ValueOf(sshKey.KeyPairFingerPrint))\n\t}\n\n\tklog.V(2).Infof(\"SSH key fingerprints match; assuming public keys match\")\n\tsshKey.PublicKey = s.PublicKey\n\tsshKey.KeyPairFingerPrint = s.KeyPairFingerPrint\n\n\treturn sshKey, nil\n}\n\nfunc (s *SSHKey) Run(c *fi.CloudupContext) error {\n\tif s.KeyPairFingerPrint == nil && s.PublicKey != nil {\n\t\tpublicKey, err := fi.ResourceAsString(*s.PublicKey)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error reading SSH public key: %w\", err)\n\t\t}\n\n\t\tkeyPairFingerPrint, err := pki.ComputeOpenSSHKeyFingerprint(publicKey)\n\t\tif err != nil {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scalewaytasks/sshkey.go#L57-L93","documentation":"Consistency guard in the SSHKey task's Find: the remote key's fingerprint does not contain the locally computed fingerprint of the spec's public key, meaning the key stored in IAM differs from the key kOps intends to use. Applying would create a mismatched key, so Find aborts. Both fingerprints are printed (spec's, then remote's).","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/scalewaytasks/sshkey.go:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Compare the two fingerprints in the message to confirm the mismatch","Delete the stale key in IAM so kOps recreates it from the spec's public key","Or update the cluster spec to reference the existing public key"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}