liamg / darktile

:waning_crescent_moon: Darktile is a GPU rendered terminal emulator designed for tiling window managers.
MIT License
3.04k stars 113 forks source link

Not intended behaviour when using go exec.Command() #287

Closed rochana-atapattu closed 3 years ago

rochana-atapattu commented 4 years ago

Describe the bug When I try to start an interactive ssh session with either golang.org/x/crypto/ssh

session, err := proxyClient.NewSession()
if err != nil {
    log.Fatalln(err)
}
defer session.Close()

modes := ssh.TerminalModes{
        ssh.ECHO:          0,     // disable echoing
        ssh.TTY_OP_ISPEED: 14400, // input speed = 14.4kbaud
        ssh.TTY_OP_OSPEED: 14400, // output speed = 14.4kbaud
}

if err := session.RequestPty("xterm", 80, 40, modes); err != nil {
        session.Close()
        log.Fatalln(err)
}
session.Stdout = os.Stdout
session.Stderr = os.Stderr
session.Stdin = os.Stdin
if err = session.Shell(); err != nil {
        log.Fatalln(err)
}
session.Wait() 

or

exec.Command("ssh","ec2-user@host")
cmd.Stdout = os.Stdout
cmd.Stderr =os.Stderr
cmd.Stdin = os.Stdin
err = cmd.Run()

The connection is established but I can't type in anything or I don't get any output from the remote instance

To Reproduce Create an interactive ssh session with go in windows

Expected behavior An ssh session where user can interact with the remote instance

Screenshots If applicable, add screenshots to help explain your problem. output

Environment (please complete the following information):

liamg commented 3 years ago

Closed due to complete rewrite as part of bringing the project back to life, please create a new issue if still relevant. Thank you!