ssh

package
v0.0.0-...-b05626a Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSSHHosts

func CheckSSHHosts(userPassedHosts []session.Host, nodesNames []string, phase string, runConfirm func(string) bool) (map[string]string, error)

Types

type Client

type Client struct {
	Settings *session.Session
	Agent    *frontend.Agent

	PrivateKeys        []session.AgentPrivateKey
	InitializeNewAgent bool
	// contains filtered or unexported fields
}

func NewClient

func NewClient(session *session.Session, privKeys []session.AgentPrivateKey) *Client

func NewClientFromFlags

func NewClientFromFlags() *Client

func NewClientFromFlagsWithHosts

func NewClientFromFlagsWithHosts() (*Client, error)

func NewInitClientFromFlags

func NewInitClientFromFlags(askPassword bool) (*Client, error)

func NewInitClientFromFlagsWithHosts

func NewInitClientFromFlagsWithHosts(askPassword bool) (*Client, error)

func (*Client) Check

func (s *Client) Check() *frontend.Check

UploadScript is used to upload script and execute it on remote server

func (*Client) Command

func (s *Client) Command(name string, arg ...string) *frontend.Command

Command is used to run commands on remote server

func (*Client) File

func (s *Client) File() *frontend.File

File is used to upload and download files and directories

func (*Client) KubeProxy

func (s *Client) KubeProxy() *frontend.KubeProxy

KubeProxy is used to start kubectl proxy and create a tunnel from local port to proxy port

func (*Client) Loop

func (s *Client) Loop(fn SSHLoopHandler) error

Loop Looping all available hosts

func (*Client) ReverseTunnel

func (s *Client) ReverseTunnel(address string) *frontend.ReverseTunnel

ReverseTunnel is used to open remote (R) tunnel

func (*Client) Start

func (s *Client) Start() (*Client, error)

func (*Client) Stop

func (s *Client) Stop()

Stop the client

func (*Client) Tunnel

func (s *Client) Tunnel(ttype, address string) *frontend.Tunnel

Tunnel is used to open local (L) and remote (R) tunnels

func (*Client) UploadScript

func (s *Client) UploadScript(scriptPath string, args ...string) *frontend.UploadScript

UploadScript is used to upload script and execute it on remote server

type NodeInterfaceWrapper

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

func NewNodeInterfaceWrapper

func NewNodeInterfaceWrapper(sshClient *Client) *NodeInterfaceWrapper

func (*NodeInterfaceWrapper) Client

func (n *NodeInterfaceWrapper) Client() *Client

func (*NodeInterfaceWrapper) Command

func (n *NodeInterfaceWrapper) Command(name string, args ...string) node.Command

func (*NodeInterfaceWrapper) File

func (n *NodeInterfaceWrapper) File() node.File

func (*NodeInterfaceWrapper) UploadScript

func (n *NodeInterfaceWrapper) UploadScript(scriptPath string, args ...string) node.Script

type RunScriptReverseTunnelChecker

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

func NewRunScriptReverseTunnelChecker

func NewRunScriptReverseTunnelChecker(c *Client, scriptPath string) *RunScriptReverseTunnelChecker

func (*RunScriptReverseTunnelChecker) CheckTunnel

func (s *RunScriptReverseTunnelChecker) CheckTunnel(ctx context.Context) (string, error)

type RunScriptReverseTunnelKiller

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

func NewRunScriptReverseTunnelKiller

func NewRunScriptReverseTunnelKiller(c *Client, scriptPath string) *RunScriptReverseTunnelKiller

func (*RunScriptReverseTunnelKiller) KillTunnel

type SSHLoopHandler

type SSHLoopHandler func(s *Client) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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