diff --git a/client_test.go b/client_test.go index caef444..8cc9360 100644 --- a/client_test.go +++ b/client_test.go @@ -37,7 +37,7 @@ func TestNewClient(t *testing.T) { } func TestNewWithPrivateKey(t *testing.T) { - c, err := NewWithPrivateKey("192.168.5.154", "22", "root", "123456") + c, err := NewWithPrivateKey("192.168.5.154", "22", "root", "123456", []string{"~/.ssh/id_ecdsa"}) if err != nil { fmt.Println(err) return diff --git a/example/update/main.go b/example/update/main.go index 37b3aff..eeb37e2 100644 --- a/example/update/main.go +++ b/example/update/main.go @@ -15,7 +15,7 @@ func main() { } defer client.Close() - output, err := client.Exec("uptime") + output, err := client.Output("uptime") if err != nil { panic(err) }