You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
415 B
Go

5 years ago
package sshd
import (
"fmt"
"testing"
"time"
)
func TestSSH(t *testing.T) {
myssh := new(StarSSH)
err := myssh.Connect("root", "", "9sday.me", "c:\\id_rsa", 22)
if err != nil {
t.Fatalf("%e", err)
}
shell, err := myssh.NewShell()
if err != nil {
t.Fatalf("%e", err)
}
shell.isprint = true
time.Sleep(5 * time.Second)
a, b, err := shell.ShellClear("apt update\n", 20000)
fmt.Println(a, b, err)
}