diff --git a/modules/ssh/ssh.go b/modules/ssh/ssh.go index d0cf6e04e87f5..98ff50bfeca9a 100644 --- a/modules/ssh/ssh.go +++ b/modules/ssh/ssh.go @@ -52,22 +52,6 @@ func handleServerConn(keyID string, chans <-chan ssh.NewChannel) { for req := range in { payload := cleanCommand(string(req.Payload)) switch req.Type { - /* - //Disabled as it doesn't do anything to sub-sequent calls - //TODO fix by populating an array of env to be added at cmd.Env of exec calls - case "env": - args := strings.Split(strings.Replace(payload, "\x00", "", -1), "\v") - if len(args) != 2 { - log.Warn("SSH: Invalid env arguments: '%#v'", args) - continue - } - args[0] = strings.TrimLeft(args[0], "\x04") - _, _, err := com.ExecCmdBytes("env", args[0]+"="+args[1]) - if err != nil { - log.Error("env: %v", err) - return - } - */ case "exec": cmdName := strings.TrimLeft(payload, "'()") log.Trace("SSH: Payload: %v", cmdName)