[botanist] Fix SSH bug
There was a minor mismatch: sshIntoNode() expects a path to
an SSH key, while DeviceContext provides the key itself.
Change-Id: I72e98e2e5d2f9c874679f68374573610e3fb5e56
diff --git a/cmd/testrunner/main.go b/cmd/testrunner/main.go
index 5755425..8b00ad5 100644
--- a/cmd/testrunner/main.go
+++ b/cmd/testrunner/main.go
@@ -12,7 +12,6 @@
"flag"
"fmt"
"io"
- "io/ioutil"
"log"
"os"
"time"
@@ -196,13 +195,8 @@
return runFuchsiaTests(fuchsia, output, devCtx)
}
-func sshIntoNode(nodename, privateKeyPath string) (*ssh.Client, error) {
- privateKey, err := ioutil.ReadFile(privateKeyPath)
- if err != nil {
- return nil, err
- }
-
- signer, err := ssh.ParsePrivateKey(privateKey)
+func sshIntoNode(nodename, privateKey string) (*ssh.Client, error) {
+ signer, err := ssh.ParsePrivateKey([]byte(privateKey))
if err != nil {
return nil, err
}