auto add exit  cmd
This commit is contained in:
Feng_Qi 2018-01-05 13:28:08 +08:00
parent cddaeaaf8d
commit 3b1a46e4e0
4 changed files with 4 additions and 5 deletions

View file

@ -1,2 +1 @@
show clock
exit
show clock

View file

@ -1,4 +1,3 @@
date
sleep 3
date
exit
date

View file

@ -12,7 +12,7 @@ import (
)
const (
VERSION = "0.1.1"
VERSION = "0.1.2"
)
type SSHHost struct {

View file

@ -74,6 +74,7 @@ func dossh(username, password, ip string, cmdlist []string, port int, ch chan st
}
defer session.Close()
cmdlist = append(cmdlist, "exit")
// cmd := "ls;date;exit"
stdinBuf, _ := session.StdinPipe()
//fmt.Fprintf(os.Stdout, "%s", stdinBuf)