mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-07-14 13:22:35 +08:00
Update ssh.go
This commit is contained in:
parent
a9e78b6de3
commit
d974523d88
@ -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())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user