|
@@ -144,7 +144,9 @@ func (i *Instance) CreateNewConnection(listenPort int, username string, remoteIp
|
|
|
if remotePort != 22 {
|
|
|
title = title + ":" + strconv.Itoa(remotePort)
|
|
|
}
|
|
|
- cmd := exec.Command(i.ExecPath, "-w", "-p", strconv.Itoa(listenPort), "--once", "--config", configPath, "--title-format", title, "ssh", "-t", connAddr, "-p", strconv.Itoa(remotePort))
|
|
|
+
|
|
|
+ sshCommand := []string{"ssh", "-t", connAddr, "-p", strconv.Itoa(remotePort)}
|
|
|
+ cmd := exec.Command(i.ExecPath, "-w", "-p", strconv.Itoa(listenPort), "--once", "--config", configPath, "--title-format", title, "bash", "-c", strings.Join(sshCommand, " "))
|
|
|
cmd.Dir = filepath.Dir(i.ExecPath)
|
|
|
cmd.Env = append(cmd.Env, "TERM=xterm")
|
|
|
cmd.Stdout = os.Stdout
|