Documentation ¶
Index ¶
- Variables
- func FixSSHAuth() error
- func GetClientConfig(host *config.Host) *gossh.ClientConfig
- func GetSSHLocalHost() string
- func GetTerminalWidth() int
- func NewAgent() (agent.Agent, error)
- func Start(cfg *SSHConfigType, targets []string) error
- type Client
- func (c *Client) Connect(host *config.Host) (err error)
- func (c *Client) ConnectSftp(host *config.Host) (err error)
- func (c *Client) Download(remotePath, localPath string) (err error)
- func (c *Client) Execute(cmd string) (exitCode int, err error)
- func (c *Client) ForwardToAgent() (err error)
- func (c *Client) ListFilesAndDirs(remotePath string) (items []string, err error)
- func (c *Client) MakeSession() (session *ssh.Session, finalize func(), err error)
- func (c *Client) Script(path string) (int, error)
- func (c *Client) Shell() error
- func (c *Client) UpdateTerminalSize(session *ssh.Session)
- func (c *Client) Upload(localPath, remotePath string) (err error)
- type SSHConfigType
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var SSHConfig = &SSHConfigType{}
Functions ¶
func FixSSHAuth ¶
func FixSSHAuth() error
func GetClientConfig ¶
func GetClientConfig(host *config.Host) *gossh.ClientConfig
func GetSSHLocalHost ¶
func GetSSHLocalHost() string
func GetTerminalWidth ¶
func GetTerminalWidth() int
func Start ¶
func Start(cfg *SSHConfigType, targets []string) error
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ForwardToAgent ¶
func (*Client) ListFilesAndDirs ¶
func (*Client) MakeSession ¶
func (*Client) UpdateTerminalSize ¶
监听窗口大小变化,并自动调节
type SSHConfigType ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.