Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthKeys ¶
func GetAuthKeys(keys []string) []ssh.AuthMethod
func GetAuthPassword ¶
func GetAuthPassword(password string) []ssh.AuthMethod
func PublicKeyFile ¶
func PublicKeyFile(file string) ssh.AuthMethod
Types ¶
type ExecResult ¶
type HostSession ¶
type HostSession struct { Username string Password string Hostname string Signers []ssh.Signer Port int Auths []ssh.AuthMethod }
func (*HostSession) Exec ¶
func (exec *HostSession) Exec(id int, command string, config ssh.ClientConfig) *ExecResult
func (*HostSession) GenerateConfig ¶
func (exec *HostSession) GenerateConfig() ssh.ClientConfig
func (*HostSession) Transfer ¶
func (exec *HostSession) Transfer(id int, localFilePath string, remoteFilePath string, config ssh.ClientConfig) *ExecResult
type SSHExecAgent ¶
func (*SSHExecAgent) SftpHostByKey ¶
func (s *SSHExecAgent) SftpHostByKey(hosts []string, user string, localFilePath string, remoteFilePath string) ([]ExecResult, error)
这里的host要带端口信息
func (*SSHExecAgent) SshHostByKey ¶
func (s *SSHExecAgent) SshHostByKey(hosts []string, user string, cmd string) ([]ExecResult, error)
Click to show internal directories.
Click to hide internal directories.