From 50b105c4afda4064457ed7512747abd28ba9f935 Mon Sep 17 00:00:00 2001 From: Kota Kanbe Date: Tue, 13 Mar 2018 22:35:25 +0900 Subject: [PATCH] fix: SSH session multiplexing (#616) --- scan/executil.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scan/executil.go b/scan/executil.go index c7c79b92..e0149a7b 100644 --- a/scan/executil.go +++ b/scan/executil.go @@ -275,13 +275,9 @@ func sshExecExternal(c conf.ServerInfo, cmd string, sudo bool) (result execResul "-o", "LogLevel=quiet", "-o", "ConnectionAttempts=3", "-o", "ConnectTimeout=10", - "-o", "ControlMaster=no", - "-o", "ControlPath=none", - - // TODO ssh session multiplexing - // "-o", "ControlMaster=auto", - // "-o", `ControlPath=~/.ssh/controlmaster-%r-%h.%p`, - // "-o", "Controlpersist=30m", + "-o", "ControlMaster=auto", + "-o", `ControlPath=~/.ssh/controlmaster-%r-%h.%p`, + "-o", "Controlpersist=10m", } args := append(defaultSSHArgs, fmt.Sprintf("%s@%s", c.User, c.Host)) args = append(args, "-p", c.Port)