忽略known_hosts记录

This commit is contained in:
屈轩
2018-11-30 15:23:40 +08:00
parent f8d0421f7a
commit 223c5aeb35
+1 -2
View File
@@ -54,9 +54,8 @@ func (c *SSHtoolSol) GetData(data string) (isShow bool, ouput string, command st
}
c.Username = data
return false, "Password:", ""
} else {
return true, "", fmt.Sprintf("%s -p %s %s %s@%s", o.Options.SshpassToolPath, data, o.Options.SshToolPath, c.Username, c.IP)
}
return true, "", fmt.Sprintf("%s -p %s %s -oGlobalKnownHostsFile=/dev/null -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no %s@%s", o.Options.SshpassToolPath, data, o.Options.SshToolPath, c.Username, c.IP)
}
func (c *SSHtoolSol) ShowInfo() string {