ssh

package
v0.0.0-...-af5c341 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSSHKeyBySshKeygen

func CreateSSHKeyBySshKeygen() error

func GetLocalSSHPrivateKey

func GetLocalSSHPrivateKey() (string, error)

func GetLocalSSHPublicKey

func GetLocalSSHPublicKey() (string, error)

func SaveSSHKey

func SaveSSHKey(pri, pub, name string) error

SaveSSHKey 保存ssh密钥到本机.ssh/ name 是"id_rsa", "id_ecdsa", "id_ed25519" 之一

Types

type RemoteClient

type RemoteClient interface {
	Close() error
	// todo...
	UploadFiles(paths []string, target string) error
	IoUploadFile(reader io.ReadCloser, target string) error
	Download(target, local string) error

	DeployGateway(hostinfo *model.ServerInfo) error
	UpdateConfig(hostinfo *model.ServerInfo) error
	GetConfig() (*model.ServerInfo, error)
}

func NewSSHClient

func NewSSHClient(gateway *model.GatewayHost, onlyTestLink bool) (RemoteClient, error)

Jump to

Keyboard shortcuts

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