mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-26 21:21:53 +08:00
Update ssh.go
This commit is contained in:
+1
-1
@@ -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
|
Host, Port, Username, Password := info.Host, info.Ports, user, pass
|
||||||
Auth := []ssh.AuthMethod{}
|
Auth := []ssh.AuthMethod{}
|
||||||
if info.SshKey != "" {
|
if info.SshKey != "" {
|
||||||
pemBytes, err := ioutil.ReadFile("shadow")
|
pemBytes, err := ioutil.ReadFile(info.SshKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, errors.New("read key failed" + err.Error())
|
return false, errors.New("read key failed" + err.Error())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user