From e8cd60a69e0f4a7bf4ff78afa4ae587a38929091 Mon Sep 17 00:00:00 2001 From: "Rick.Chan" Date: Fri, 10 Feb 2023 13:39:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=A4=BA=E4=BE=8B=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E5=92=8C=E6=B5=8B=E8=AF=95=E7=A8=8B=E5=BA=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rick.Chan --- client_test.go | 2 +- example/update/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) }