Documentation ¶
Index ¶
- Variables
- func Connect(addr string, config *ssh.ClientConfig) (ok bool, err error)
- func ConnectWithCredential(addr string, cred model.Credential, timeout time.Duration) (ok bool, err error)
- func ConnectWithPassword(addr, user, passwd string, timeout time.Duration) (ok bool, err error)
- func GetAuthMethod(cred model.Credential) (ssh.AuthMethod, error)
- type SSH
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Name = "ssh"
)
Functions ¶
func Connect ¶
func Connect(addr string, config *ssh.ClientConfig) (ok bool, err error)
Connect connects to the server using the provided ClientConfig
func ConnectWithCredential ¶
func ConnectWithCredential(addr string, cred model.Credential, timeout time.Duration) (ok bool, err error)
ConnectWithCredential returns ok == true, if the credential work, else err is not nil
func ConnectWithPassword ¶
ConnectWithCredential returns ok == true, if the credential work, else err is not nil
func GetAuthMethod ¶
func GetAuthMethod(cred model.Credential) (ssh.AuthMethod, error)
GetAuthMethod returns the appropriate ssh.AuthMethod based on the provided Credentials
Types ¶
type SSH ¶
type SSH struct { //stuff Host string Port int // Options StopIfSuccess bool StopIfNetErr bool LogFailedAttempts bool // contains filtered or unexported fields }
SSH defines configs for a specific target, which can be checked with credentials
func (*SSH) Add ¶
func (bruter *SSH) Add(c model.Credential)
Add uses a credential pair for the connection blocking !
Click to show internal directories.
Click to hide internal directories.