remote

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const SshProxyJumpMaxDepth = 10

Variables

This section is empty.

Functions

func ConnectToClient

func ConnectToClient(connCtx context.Context, opts *SSHOpts, currentClient *ssh.Client, jumpNum int32) (*ssh.Client, int32, error)

func CpHostToRemote

func CpHostToRemote(client *ssh.Client, sourcePath string, destPath string) error

func DetectShell

func DetectShell(client *ssh.Client) (string, error)

func GetClientArch

func GetClientArch(client *ssh.Client) (string, error)

func GetClientOs

func GetClientOs(client *ssh.Client) (string, error)

func GetHomeDir

func GetHomeDir(client *ssh.Client) string

func GetWshPath

func GetWshPath(client *ssh.Client) string

func GetWshVersion

func GetWshVersion(client *ssh.Client) (string, error)

func InstallClientRcFiles

func InstallClientRcFiles(client *ssh.Client) error

func IsPowershell

func IsPowershell(shellPath string) bool

func NormalizeConfigPattern

func NormalizeConfigPattern(pattern string) string

func WaveSshConfigUserSettings added in v0.9.0

func WaveSshConfigUserSettings() *ssh_config.UserSettings

Types

type ConnectionDebugInfo added in v0.9.0

type ConnectionDebugInfo struct {
	CurrentClient *ssh.Client
	NextOpts      *SSHOpts
	JumpNum       int32
}

type ConnectionError added in v0.9.0

type ConnectionError struct {
	*ConnectionDebugInfo
	Err error
}

func (ConnectionError) Error added in v0.9.0

func (ce ConnectionError) Error() string

type HostKeyAlgorithms

type HostKeyAlgorithms = func(hostWithPort string) (algos []string)

type SSHOpts

type SSHOpts struct {
	SSHHost string `json:"sshhost"`
	SSHUser string `json:"sshuser"`
	SSHPort int    `json:"sshport,omitempty"`
}

func ParseOpts

func ParseOpts(input string) (*SSHOpts, error)

func (SSHOpts) String

func (opts SSHOpts) String() string

type SshKeywords

type SshKeywords struct {
	User                         string
	HostName                     string
	Port                         string
	IdentityFile                 []string
	BatchMode                    bool
	PubkeyAuthentication         bool
	PasswordAuthentication       bool
	KbdInteractiveAuthentication bool
	PreferredAuthentications     []string
	AddKeysToAgent               bool
	IdentityAgent                string
	ProxyJump                    []string
	UserKnownHostsFile           []string
	GlobalKnownHostsFile         []string
}

type UserInputCancelError

type UserInputCancelError struct {
	Err error
}

func (UserInputCancelError) Error

func (uice UserInputCancelError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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