diff --git a/pkg/cluster/manager/manager.go b/pkg/cluster/manager/manager.go index 3740a30ea0..7eb9170541 100644 --- a/pkg/cluster/manager/manager.go +++ b/pkg/cluster/manager/manager.go @@ -195,29 +195,26 @@ func (m *Manager) fillHostArchOrOS(s, p *tui.SSHConnectionProps, topo spec.Topol } hostArchOrOS[inst.GetHost()] = "" - tf := task.NewSimpleUerSSH(m.logger, inst.GetHost(), inst.GetSSHPort(), user, *gOpt, p, globalSSHType) - if s.Password != "" || user == "root" { - tf = task.NewBuilder(m.logger). - RootSSH( - inst.GetHost(), - inst.GetSSHPort(), - user, - s.Password, - s.IdentityFile, - s.IdentityFilePassphrase, - gOpt.SSHTimeout, - gOpt.OptTimeout, - gOpt.SSHProxyHost, - gOpt.SSHProxyPort, - gOpt.SSHProxyUser, - p.Password, - p.IdentityFile, - p.IdentityFilePassphrase, - gOpt.SSHProxyTimeout, - gOpt.SSHType, - globalSSHType, - ) - } + tf := task.NewBuilder(m.logger). + RootSSH( + inst.GetHost(), + inst.GetSSHPort(), + user, + s.Password, + s.IdentityFile, + s.IdentityFilePassphrase, + gOpt.SSHTimeout, + gOpt.OptTimeout, + gOpt.SSHProxyHost, + gOpt.SSHProxyPort, + gOpt.SSHProxyUser, + p.Password, + p.IdentityFile, + p.IdentityFilePassphrase, + gOpt.SSHProxyTimeout, + gOpt.SSHType, + globalSSHType, + ) switch fullType { case spec.FullOSType: