Files
cloudpods/pkg/util/ssh/ssh_test.go
T
Zexi Li 732ef80270 - support relay address
- ssh util
- baremetal tasks
2019-01-07 17:05:33 +08:00

26 lines
395 B
Go

package ssh
import (
"testing"
"yunion.io/x/log"
)
const (
username = "root"
host = "10.168.222.245"
password = "123@openmag"
)
func TestRun(t *testing.T) {
client, err := NewClient(host, 22, username, password, "")
if err != nil {
t.Error(err)
}
out, err := client.Run("ls", "uname -a", "date", "hostname")
if err != nil {
t.Error(err)
}
log.Infof("output: %#v", out)
}