sshutils

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleSftp

func HandleSftp(
	sshConfig SshConfig,
	handle func(
		*sftp.Client,
		*ssh.Session,
	) error,
) error

Types

type SshConfig

type SshConfig struct {
	User       string
	Host       string
	Port       int
	TargetDir  string // used as relative dir for "./example" on the target server
	PrivateKey string // can be empty if Password is set
	Password   string // can be empty if PrivateKey is set
}

func NewSshConfig

func NewSshConfig(
	rawConnectionURL string,
) (SshConfig, error)

func (*SshConfig) VerifySshConfig

func (sshConfig *SshConfig) VerifySshConfig() error

Jump to

Keyboard shortcuts

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