Add xterm
This commit is contained in:
4
main.go
4
main.go
@@ -95,7 +95,7 @@ func handleConn(conn net.Conn, config *ssh.ServerConfig) {
|
||||
func handleChannel(channel ssh.Channel, requests <-chan *ssh.Request) {
|
||||
defer channel.Close()
|
||||
var ptmx *os.File
|
||||
var termWidth, termHeight uint32 = 15, 15
|
||||
var termWidth, termHeight uint32 = 80, 24
|
||||
for req := range requests {
|
||||
switch req.Type {
|
||||
case "pty-req":
|
||||
@@ -130,7 +130,7 @@ func handleChannel(channel ssh.Channel, requests <-chan *ssh.Request) {
|
||||
command = "/app/tui"
|
||||
}
|
||||
cmd := exec.Command(command)
|
||||
cmd.Env = []string{"PATH=/bin"}
|
||||
cmd.Env = []string{"PATH=/bin", "TERM=xterm"}
|
||||
cmd.Dir = "/"
|
||||
var err error
|
||||
ptmx, err = pty.Start(cmd)
|
||||
|
||||
Reference in New Issue
Block a user