sshclient

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSSHNotReady = fn.Error("ssh is not ready")

Functions

func CheckSSHConnection added in v1.1.0

func CheckSSHConnection(sc SSHConfig) error

func DoSSH

func DoSSH(sc SSHConfig) error

func GetForwardController

func GetForwardController(sshUser, sshHost, keyPath string) (startCh, cancelCh chan StartCh, exitCh chan struct{}, lports map[string]StartCh, runner func())

func HostKeyCallback added in v1.1.0

func HostKeyCallback(hostname string, remote net.Addr, key ssh.PublicKey) error

Types

type SSHConfig

type SSHConfig struct {
	Host    string
	User    string
	KeyPath string

	SSHPort int
}

type StartCh

type StartCh struct {
	RemotePort string `json:"remotePort"`
	SshPort    string `json:"sshPort"`
	LocalPort  string `json:"localPort"`
}

func (*StartCh) GetId

func (pf *StartCh) GetId() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳