|
@@ -140,7 +140,11 @@ func (i *Instance) CreateNewConnection(listenPort int, username string, remoteIp
|
|
|
connAddr = username + "@" + remoteIpAddr
|
|
|
}
|
|
|
configPath := filepath.Join(filepath.Dir(i.ExecPath), ".gotty")
|
|
|
- cmd := exec.Command(i.ExecPath, "-w", "-p", strconv.Itoa(listenPort), "--once", "--config", configPath, "ssh", connAddr, "-p", strconv.Itoa(remotePort))
|
|
|
+ title := username + "@" + remoteIpAddr
|
|
|
+ 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", connAddr, "-p", strconv.Itoa(remotePort))
|
|
|
cmd.Dir = filepath.Dir(i.ExecPath)
|
|
|
cmd.Stdout = os.Stdout
|
|
|
cmd.Stderr = os.Stderr
|