t1_session

package
v0.0.0-...-63b2ac5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthLogger

func AuthLogger(conn ssh.ConnMetadata, method string, err error)

func BannerHello

func BannerHello(conn ssh.ConnMetadata) string

func Main

func Main()

func SSHConnect

func SSHConnect(user, password, host string, port int) (*ssh.Session, error)

Types

type AuthContext

type AuthContext struct {
	// contains filtered or unexported fields
}

func NewAuthContext

func NewAuthContext() *AuthContext

type Cli

type Cli struct {
	// ip地址
	Ip string
	// contains filtered or unexported fields
}

func New

func New(ip string, port int, username string, passwd string) *Cli

创建command-Cli对象

func (Cli) Execu

func (c Cli) Execu(shell string) (msg string, err error)

func (*Cli) RunTerminal

func (cli *Cli) RunTerminal(shell string, stdin io.Reader, stdout, stderr io.Writer) (err error)

type PublicKeyResult

type PublicKeyResult struct {
	// contains filtered or unexported fields
}

type StdProxy

type StdProxy struct {
	// contains filtered or unexported fields
}

func (*StdProxy) InfoStr

func (proxy *StdProxy) InfoStr() string

func (*StdProxy) Read

func (proxy *StdProxy) Read(p []byte) (n int, err error)

func (*StdProxy) Write

func (proxy *StdProxy) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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