mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-16 20:49:16 +08:00
21 lines
304 B
Go
21 lines
304 B
Go
package ssh
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestSSH(t *testing.T) {
|
|
ss := ConnInfo{
|
|
Addr: "172.16.10.111",
|
|
Port: 22,
|
|
User: "root",
|
|
AuthMode: "password",
|
|
Password: "Calong@2015",
|
|
}
|
|
_, err := ss.NewClient()
|
|
if err != nil {
|
|
fmt.Println(err)
|
|
}
|
|
fmt.Println(ss.Run("ip a"))
|
|
}
|