diff --git a/pkg/daemon/handler/ssh.go b/pkg/daemon/handler/ssh.go index c62ab3d4..69379775 100644 --- a/pkg/daemon/handler/ssh.go +++ b/pkg/daemon/handler/ssh.go @@ -157,7 +157,7 @@ func startDaemonProcess(cli *ssh.Client) { func getDaemonVersionFromOutput(output []byte) (version string) { type Data struct { - DaemonVersion string `json:"DaemonVersion"` + DaemonVersion string `json:"Daemon"` } // remove first line buf := bufio.NewReader(bytes.NewReader(output)) diff --git a/pkg/util/ns.go b/pkg/util/ns.go index 79ca6a8a..b2015971 100644 --- a/pkg/util/ns.go +++ b/pkg/util/ns.go @@ -97,7 +97,7 @@ func ConvertToKubeConfigBytes(factory cmdutil.Factory) ([]byte, string, error) { } func ConvertToTempKubeconfigFile(kubeconfigBytes []byte) (string, error) { - temp, err := os.CreateTemp("", "*.tmp.kubeconfig") + temp, err := os.CreateTemp("", "*.kubeconfig") if err != nil { return "", err } diff --git a/pkg/util/ssh.go b/pkg/util/ssh.go index 740fa4fc..019f7802 100644 --- a/pkg/util/ssh.go +++ b/pkg/util/ssh.go @@ -628,7 +628,7 @@ func SshJump(ctx context.Context, conf *SshConfig, flags *pflag.FlagSet, print b } var temp *os.File - if temp, err = os.CreateTemp("", "kubevpn"); err != nil { + if temp, err = os.CreateTemp("", "*.kubeconfig"); err != nil { return } if err = temp.Close(); err != nil {