This commit is contained in:
shadow1ng
2021-06-09 11:16:23 +08:00
parent 90ef895e0f
commit c90c9272f0
4 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ func SshConn(info *common.HostInfo, user string, pass string) (flag bool, err er
Host, Port, Username, Password := info.Host, info.Ports, user, pass
Auth := []ssh.AuthMethod{}
if info.SshKey != "" {
pemBytes, err := ioutil.ReadFile("shadow")
pemBytes, err := ioutil.ReadFile(info.SshKey)
if err != nil {
return false, errors.New("read key failed" + err.Error())
}