修正示例程序和测试程序.

Signed-off-by: Rick.Chan <cy@haoan119.com>
This commit is contained in:
Rick.Chan 2023-02-10 13:39:04 +08:00
parent 60d53bae4f
commit e8cd60a69e
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -15,7 +15,7 @@ func main() {
}
defer client.Close()
output, err := client.Exec("uptime")
output, err := client.Output("uptime")
if err != nil {
panic(err)
}