From 0daf0d690cedeafcb112099c4b23f63d139f9ca7 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Thu, 24 Jul 2025 10:23:45 +0800 Subject: [PATCH] fix: Resolve deleted node status display issue (#9633) --- core/utils/ssh/ssh.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/utils/ssh/ssh.go b/core/utils/ssh/ssh.go index 6abf38c40..9471d8250 100644 --- a/core/utils/ssh/ssh.go +++ b/core/utils/ssh/ssh.go @@ -56,6 +56,9 @@ func NewClient(c ConnInfo) (*SSHClient, error) { return nil, err } sshClient := &SSHClient{Client: client} + if c.User == "root" { + return sshClient, nil + } if _, err := sshClient.Run("sudo -n ls"); err == nil { sshClient.SudoItem = "sudo" }