mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-12-14 00:31:51 +08:00
22 lines
304 B
Go
22 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"))
|
|
}
|