mirror of
https://github.com/shanghai-edu/multissh.git
synced 2025-12-14 12:27:47 +00:00
0.1.2
auto add exit cmd
This commit is contained in:
parent
cddaeaaf8d
commit
3b1a46e4e0
4 changed files with 4 additions and 5 deletions
|
|
@ -1,2 +1 @@
|
|||
show clock
|
||||
exit
|
||||
show clock
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
date
|
||||
sleep 3
|
||||
date
|
||||
exit
|
||||
date
|
||||
2
main.go
2
main.go
|
|
@ -12,7 +12,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
VERSION = "0.1.1"
|
||||
VERSION = "0.1.2"
|
||||
)
|
||||
|
||||
type SSHHost struct {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue