sftp

package
v0.0.0-...-1465f44 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostKeyCb

func HostKeyCb(registeredKey ssh.PublicKey) ssh.HostKeyCallback

func LoadRegisteredPublicKey

func LoadRegisteredPublicKey(path string) (ssh.PublicKey, error)

Types

type SSHServer

type SSHServer struct {
	Addr           string
	Port           int
	PrivateKeyPath string
	PublicKeyPath  string
}

func NewSSHServer

func NewSSHServer(addr string, port int, pubKeyPath, privKeyPath string) *SSHServer

func (SSHServer) UploadFile

func (s SSHServer) UploadFile(file multipart.File, fileName, user string) (string, error)

UploadFile uploads a file to the sftp server

Jump to

Keyboard shortcuts

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