From cce2af501018bcf3680c9baca246809c94dd5563 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Sat, 10 Oct 2020 14:36:03 +0800 Subject: [PATCH] webconsole: ssh: each argument on its own line --- pkg/webconsole/command/ssh_command.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/webconsole/command/ssh_command.go b/pkg/webconsole/command/ssh_command.go index a3255ae3d0..0591c13151 100644 --- a/pkg/webconsole/command/ssh_command.go +++ b/pkg/webconsole/command/ssh_command.go @@ -129,8 +129,11 @@ func (c *SSHtoolSol) GetCommand() *exec.Cmd { args := []string{ o.Options.SshpassToolPath, "-p", c.password, o.Options.SshToolPath, "-p", fmt.Sprintf("%d", c.Port), fmt.Sprintf("%s@%s", c.username, c.IP), - "-oGlobalKnownHostsFile=/dev/null", "-oUserKnownHostsFile=/dev/null", "-oStrictHostKeyChecking=no", - "-oPreferredAuthentications=password", "-oPubkeyAuthentication=no", //密码登录时,避免搜寻秘钥登录 + "-oGlobalKnownHostsFile=/dev/null", + "-oUserKnownHostsFile=/dev/null", + "-oStrictHostKeyChecking=no", + "-oPreferredAuthentications=password", + "-oPubkeyAuthentication=no", // 密码登录时,避免搜寻秘钥登录 "-oNumberOfPasswordPrompts=1", } cmd := exec.Command(args[0], args[1:]...)