ssh_util

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	Session *ssh.Session
	Client  *ssh.Client
	// contains filtered or unexported fields
}

func NewSession

func NewSession() (*Session, error)

func (*Session) ClientConfig

func (session *Session) ClientConfig(user string) *ssh.ClientConfig

func (*Session) Close

func (session *Session) Close()

func (*Session) Connect

func (session *Session) Connect(serverAddr, user string) error

func (*Session) ForwardAgent

func (session *Session) ForwardAgent() error

func (*Session) ForwardLocalPort

func (session *Session) ForwardLocalPort(localPort, remotePort int) error

func (*Session) Output

func (session *Session) Output(cmd string) (string, error)

Output uses ssh_util.Session to run cmd on the remote host and returns its standard output.

Jump to

Keyboard shortcuts

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