Documentation ¶
Index ¶
- func ConnectWithKey(user, keyPath string, host string, port int) (*ssh.Client, error)
- func ConnectWithPassword(user, pass string, host string, port int) (*ssh.Client, error)
- func GrabBanner(host string, port int) (string, error)
- func ParseBanner(s string) (r string)
- func Run(c *ssh.Client, cmd string, stdout, stderr io.Writer) error
- func Shell(c *ssh.Client) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectWithKey ¶
func ConnectWithPassword ¶
func ParseBanner ¶
Types ¶
type Options ¶
type Options struct { Targets struct { TARGETS []string `description:"Provide target IP/FQDN/FILE"` } `positional-args:"yes"` Connection struct { Username string `short:"u" description:"Provide username (or FILE)"` Password string `short:"p" description:"Provide password (or FILE)"` PrivKey string `short:"k" long:"private-key" description:"Provide a path to a ssh private key without password"` Port int `long:"port" default:"22" description:"Port to contact"` } `group:"Connection Options" description:"Connection Options"` Mode struct { Exec string `long:"exec" description:"Execute command on target host"` Shell bool `long:"shell" description:"Spawn a shell"` } `group:"Execution Mode"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.