client.NewSession() 3 fd := int(os.Stdin.Fd() 4 oldState, err := terminal.MakeRaw(fd)) 5 session.Stdout = os.Stdout 6 session.Stderr = os.Stderr 7 session.Stdin = os.Stdin 8 modes := ssh.TerminalModes{ 9 ssh.ECHO: 1, 10 ssh.TTY_OP_ISPEED: 14400, 11 ssh.TTY_OP_OSPEED: 14400, 12 } 13 err = session.RequestPty("xterm-256color", h, w, modes) 14 err = session.Shell() 15 err = session.Wait() Can implement by 15 line !