ssh

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CURRENT_USER = Key{
	// contains filtered or unexported fields
}

Functions

func BackwardProxy

func BackwardProxy(hostConf config.Host, options Options, passwordFlag, keepassPwdFlag string, listeningIp string, listeningPort uint16, destinationAddr string, destinationPort uint16)

func ForwardProxy

func ForwardProxy(hostConf config.Host, options Options, passwordFlag, keepassPwdFlag string, listeningIp string, listeningPort uint16, destinationAddr string, destinationPort uint16)

func GetCurrentUser

func GetCurrentUser(ctx context.Context) string

func GetFirstNonNilSshClient

func GetFirstNonNilSshClient(jumpClient SshClient) *ssh.Client

func Http

func Http(hostConf config.Host, options Options, passwordFlag, keepassPwdFlag string, listeningIp string, listeningPort uint16)

func InitContext

func InitContext() context.Context

func InitKeepassPwdMap

func InitKeepassPwdMap(hostConfig config.Host, keepassPwdFlag string) map[string]string

func ReadKeepass

func ReadKeepass(path, pwd, id, username string) string

func Shell

func Shell(hostConf config.Host, passwordFlag, keepassPwdFlag string)

func Socks

func Socks(hostConf config.Host, options Options, passwordFlag, keepassPwdFlag string, listeningIp string, listeningPort uint16)

Types

type Key

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

type Options

type Options struct {
	Verbose bool
}

type PatternDetector

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

type SshClient

type SshClient struct {
	Client     *ssh.Client
	ChangeUser *struct {
		// contains filtered or unexported fields
	}
	Jump *SshClient
}

func NewSshClient

func NewSshClient(ctx context.Context, hostConfig config.Host, passwordFlag string, keepassPwdMap map[string]string) (SshClient, context.Context)

func (SshClient) Close

func (c SshClient) Close()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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