Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSCPClient ¶
Types ¶
type SSHSession ¶
type SSHSession struct {
Stdout io.Reader
Stdin io.Writer
Stderr io.Reader
// contains filtered or unexported fields
}
func NewSSHSessionWithRoot ¶
func NewSSHSessionWithRoot(session *ssh.Session, useSudo, noPasswordSudo bool, rootPassword, userPassword string) *SSHSession
New Session and auto switch root user
func NewSSHSessionWithRootAndCmdDelay ¶
func NewSSHSessionWithRootAndCmdDelay(session *ssh.Session, useSudo, noPasswordSudo bool, rootPassword, userPassword string, cmdDelay time.Duration) *SSHSession
New Session and auto switch root user(support custom switch cmd delay)
func (*SSHSession) Ready ¶
func (s *SSHSession) Ready() <-chan int
func (*SSHSession) ShellDone ¶
func (s *SSHSession) ShellDone() <-chan int
func (*SSHSession) TerminalWithKeepAlive ¶
func (s *SSHSession) TerminalWithKeepAlive(serverAliveInterval time.Duration) error
open a interactive shell with keepalive
Click to show internal directories.
Click to hide internal directories.