ssh

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AuthKeyPassword auth by Password
	AuthKeyPassword = "password"
	// AuthKeyKey auth by key
	AuthKeyKey = "key"
	// AuthKeyCert  auth by cert
	AuthKeyCert = "cert"
	// AuthKeyPkcs11 auth by pkcs11
	AuthKeyPkcs11 = "pkcs11"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthKey added in v0.6.13

type AuthKey struct {
	// auth type:
	//   - password
	//   - agent
	//   - key
	//   - cert
	//   - pkcs11
	Type string

	// auth type value:
	//   - key(path)
	//     ex.) ~/.ssh/id_rsa
	//   - cert(path)
	//     ex.) ~/.ssh/id_rsa.crt
	//   - pkcs11(libpath)
	//     ex.) /usr/local/lib/opensc-pkcs11.so
	Value string
}

AuthKey define auth key.

type PathSet added in v0.6.13

type PathSet struct {
	Base      string
	PathSlice []string
}

PathSet ...

type PipeSet added in v0.6.13

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

PipeSet is pipe in/out set struct.

type Run added in v0.5.0

type Run struct {
	ServerList []string
	Conf       conf.Config

	// Mode value in
	//     - shell
	//     - cmd
	//     - pshell
	Mode string

	// tty use (-t option)
	IsTerm bool

	// parallel connect (-p option)
	IsParallel bool

	// not run (-N option)
	IsNone bool

	// x11 forwarding (-X option)
	X11 bool

	// use or not-use local bashrc.
	// IsNotBashrc takes precedence.
	IsBashrc    bool
	IsNotBashrc bool

	// enable/disable print header in command mode
	EnableHeader  bool
	DisableHeader bool

	// local/remote Port Forwarding
	PortForwardMode   string // L or R
	PortForwardLocal  string
	PortForwardRemote string

	// Dynamic Port Forwarding
	// set localhost port num (ex. 11080).
	DynamicPortForward string

	// Exec command
	ExecCmd []string
	// contains filtered or unexported fields
}

Run running info.

func NewRun added in v1.0.0

func NewRun(confFile string) *Run

NewRun news a Run struct.

func (*Run) CreateAuthMethodMap added in v0.6.13

func (r *Run) CreateAuthMethodMap()

CreateAuthMethodMap Create ssh.AuthMethod, into r.AuthMethodMap.

func (*Run) CreateSSHConnect added in v0.6.13

func (r *Run) CreateSSHConnect(server string) (connect *sshlib.Connect, err error)

CreateSSHConnect return *sshlib.Connect this vaule in ssh.Client with proxy.

func (*Run) PrintSelectServer added in v0.6.13

func (r *Run) PrintSelectServer()

PrintSelectServer is printout select server. use ssh login header.

func (*Run) SetupSSHAgent added in v0.6.13

func (r *Run) SetupSSHAgent()

SetupSSHAgent setup SSH agent.

func (*Run) Start added in v0.5.0

func (r *Run) Start()

Start ssh connect.

Jump to

Keyboard shortcuts

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