ssh

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUTHKEY_PASSWORD = "password"
	AUTHKEY_AGENT    = "agent"
	AUTHKEY_KEY      = "key"
	AUTHKEY_CERT     = "cert"
	AUTHKEY_PKCS11   = "pkcs11"
)
View Source
const SSH_AUTH_SOCK = "SSH_AUTH_SOCK"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthKey added in v0.5.5

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 Auth map key struct.

type PathSet added in v0.6.0

type PathSet struct {
	Base      string
	PathSlice []string
}

use scp,sftp

type PipeSet added in v0.6.0

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

	// local/remote Port Forwarding
	PortForward []*conf.PortForward

	// TODO(blacknon): Delete old keys
	// L or R
	PortForwardMode string

	//
	PortForwardLocal string

	//
	PortForwardRemote string

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

	// Reverse Dynamic Port Forwarding
	// set remotehost port num (ex. 11080).
	ReverseDynamicPortForward string

	// Exec command
	ExecCmd []string

	// enable/disable print header in command mode
	EnableHeader  bool
	DisableHeader bool
	// contains filtered or unexported fields
}

Run

func (*Run) CreateAuthMethodMap added in v0.6.0

func (r *Run) CreateAuthMethodMap()

CreateAuthMethodMap Create ssh.AuthMethod, into r.AuthMethodMap.

func (*Run) CreateSshConnect added in v0.6.0

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.0

func (r *Run) PrintSelectServer()

PrintSelectServer is printout select server. use ssh login header.

func (*Run) SetupSshAgent added in v0.6.0

func (r *Run) SetupSshAgent()

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