sshutils

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSCPClient

func NewSCPClient(client *ssh.Client) (*scpClient, error)

Types

type SSHSession

type SSHSession struct {
	Stdin  io.Writer
	Stdout io.Reader
	Stderr io.Reader
	// contains filtered or unexported fields
}

func NewSSHSession

func NewSSHSession(se *ssh.Session, hookCmd string, hookStdout bool) *SSHSession

NewSSHSession return a pointer to SSHSession

func (*SSHSession) Close

func (s *SSHSession) Close() error

Close close the session

func (*SSHSession) PipeExec

func (s *SSHSession) PipeExec(cmd string, printFn func(r io.Reader, w io.Writer)) error

PipeExec exec remote commands and provides pipeline output reading

func (*SSHSession) Terminal

func (s *SSHSession) Terminal() error

Terminal open a interactive terminal shell

func (*SSHSession) TerminalWithKeepAlive

func (s *SSHSession) TerminalWithKeepAlive(interval time.Duration) error

TerminalWithKeepAlive open a interactive terminal shell with keepalive

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL