parent
60d53bae4f
commit
e8cd60a69e
|
@ -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
|
||||
|
|
|
@ -15,7 +15,7 @@ func main() {
|
|||
}
|
||||
defer client.Close()
|
||||
|
||||
output, err := client.Exec("uptime")
|
||||
output, err := client.Output("uptime")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue