Versions in this module Expand all Collapse all v1 v1.1.0 Apr 8, 2020 Changes in this version + const CS7 + const CS8 + const DEFAULT_CHUNK_SIZE + const ECHO + const ECHOCTL + const ECHOE + const ECHOK + const ECHOKE + const ECHONL + const ICANON + const ICRNL + const IEXTEN + const IGNCR + const IGNPAR + const IMAXBEL + const INLCR + const INPCK + const ISIG + const ISTRIP + const IUCLC + const IXANY + const IXOFF + const IXON + const MIN_CHUNKS + const MIN_THROUGHPUT + const NOFLSH + const OCRNL + const OLCUC + const ONLCR + const ONLRET + const ONOCR + const OPOST + const PARENB + const PARMRK + const PARODD + const PENDIN + const THROUGHPUT_SLEEP_INTERVAL + const TOSTOP + const TTY_OP_ISPEED + const TTY_OP_OSPEED + const VDISCARD + const VDSUSP + const VEOF + const VEOL + const VEOL2 + const VERASE + const VFLUSH + const VINTR + const VKILL + const VLNEXT + const VQUIT + const VREPRINT + const VSTART + const VSTATUS + const VSTOP + const VSUSP + const VSWTCH + const VWERASE + const XCASE + func CopyIOAndUpdateSessionDeadline(dst io.Writer, src io.Reader, session *SshSession) (written int64, err error) + func UploadFile(hostname, sourceFile, targetFile string) (stdout, stderr string, err error) + type ForwardConfig struct + LocalBindAddress string + RemoteAddress string + SshPrivateKey string + SshServerAddress string + SshUserName string + SshUserPassword string + type LocalForwardServer struct + func (this *LocalForwardServer) Start(call func()) + func (this *LocalForwardServer) Stop() + type PtyInfo struct + H int + Modes ssh.TerminalModes + Term string + W int + type ReadWriteCloser interface + type SSHClient struct + func NewSSHClient(config *SSHClientConfig) (client *SSHClient) + func (c *SSHClient) Cmd(cmd string, sn *SshSession, deadline *time.Time, idleTimeout int) (output, errput string, currentSession *SshSession, err error) + func (c *SSHClient) Connect() (conn *ssh.Client, err error) + func (c *SSHClient) Pipe(rw ReadWriteCloser, pty *PtyInfo, deadline *time.Time, idleTimeout int) (currentSession *SshSession, err error) + func (c *SSHClient) TransferData(target string, data []byte) (stdout, stderr string, err error) + type SSHClientConfig struct + DialTimeoutSecond int + Host string + MaxDataThroughput uint64 + Password string + Privatekey string + User string + type SshSession struct + Stderr *bytes.Buffer + Stdout *bytes.Buffer + func ExecuteCmd(cmd, hostname string) (output, errput string, currentSession *SshSession, err error) + func NewSession(conn *ssh.Client, deadline *time.Time, idleTimeout int) (ss *SshSession, err error) + func NewSessionWithChannel(conn *ssh.Client, ch ssh.Channel, deadline *time.Time, idleTimeout int) (ss *SshSession, err error) + func (sc *SshSession) Close() error + func (sc *SshSession) RequestPty(term string, h int, w int, termmodes ssh.TerminalModes) (err error) + func (sc *SshSession) Run(cmd string) (err error) + func (sc *SshSession) SetDeadline(deadline *time.Time) + func (sc *SshSession) Shell() error + func (sc *SshSession) StderrPipe() (io.Reader, error) + func (sc *SshSession) StdinPipe() (io.WriteCloser, error) + func (sc *SshSession) StdoutPipe() (io.Reader, error) + func (sc *SshSession) Wait() error + type Tunnel struct + Client *ssh.Client + type UUID [16]byte + func FromStr(s string) (id UUID, err error) + func MustFromStr(s string) UUID + func Rand() UUID + func (this UUID) Hex() string