diff --git a/cmd1.txt.example b/cmd1.txt.example index f61b2a7..f58a975 100644 --- a/cmd1.txt.example +++ b/cmd1.txt.example @@ -1,2 +1 @@ -show clock -exit \ No newline at end of file +show clock \ No newline at end of file diff --git a/cmd2.txt.example b/cmd2.txt.example index 12a5f15..341974a 100644 --- a/cmd2.txt.example +++ b/cmd2.txt.example @@ -1,4 +1,3 @@ date sleep 3 -date -exit \ No newline at end of file +date \ No newline at end of file diff --git a/main.go b/main.go index ffdb520..8390fb6 100644 --- a/main.go +++ b/main.go @@ -12,7 +12,7 @@ import ( ) const ( - VERSION = "0.1.1" + VERSION = "0.1.2" ) type SSHHost struct { diff --git a/sshconnect.go b/sshconnect.go index 8e0c4c9..1962557 100644 --- a/sshconnect.go +++ b/sshconnect.go @@ -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)