func (this Scanner) Scan(target, cmd string, cred scanners.Credential, outChan chan scanners.Result) {
	if !strings.Contains(target, ":") {
		target = target + ":22"
	}
	var config ssh.ClientConfig
	var err error
	result := scanners.Result{
		Host:    target,
		Auth:    cred,
		Message: "Successfully connected",
		Status:  true,
		Output:  "",
	}
	switch cred.Type {
	case "basic":
		config, err = this.prepPassConfig(cred.Account, cred.AuthData)
	case "sshkey":
		config, err = this.prepCertConfig(cred.Account, cred.AuthData)
	}
	if err != nil {
		result.Message = err.Error()
		result.Status = false
	}
	_, session, err := this.connect(cred.Account, target, config)
	if err != nil {
		result.Message = err.Error()
		result.Status = false
	}
	if err == nil && cmd != "" {
		result.Output, err = this.executeCommand(cmd, session)
		if err != nil {
			result.Output = "Script Error: " + err.Error()
		}
	}
	outChan <- result
}
Runs the actual scan, takes an input of our target, the creds we need to use for this one,
a command to run if we have one, and our out channel for results
package ssh
import (
	"io/ioutil"
	"strings"
	"github.com/emperorcow/go-netscan/scanners"
	"golang.org/x/crypto/ssh"
)
type Scanner struct{}
func (this Scanner) Name() string {
	return "ssh"
}
func (this Scanner) Description() string {
	return "Secure Shell (Scanner)"
}
func (this Scanner) SupportedAuthentication() []string {
	return []string{"basic", "sshkey"}
}
func (this Scanner) SupportedAuthenticationExample() map[string]string {
	return map[string]string{
		"basic":  "USERNAME,PASSWORD",
		"sshkey": "USERNAME,/path/to/key/file.pem",
	}
}