package sshd import ( "fmt" "testing" ) func TestSSH(t *testing.T) { myssh := new(StarSSH) err := myssh.Connect("root", "128je980", "nasf.b612.me", "", 22000) if err != nil { t.Fatalf("%e", err) } shell, err := myssh.NewShell() if err != nil { fmt.Println(err) t.Fatalf("%e", err) } shell.isprint = false fmt.Println(myssh.Exists("/root")) fmt.Println(myssh.IsFile("/root")) fmt.Println(myssh.IsFolder("/root")) a, b, err := shell.ShellClear("whoami", 2000) fmt.Println(a, b, err) }