ssh

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package ssh Description: ssh连接服务器 上传文件 下载文件 执行命令

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ESSH

type ESSH struct {
	ESSHI
	// contains filtered or unexported fields
}

func NewESSH

func NewESSH() *ESSH

func (*ESSH) E上传文件

func (e *ESSH) E上传文件(本地文件 string, 远程文件 string, fn func(进度 int)) error

func (*ESSH) E下载文件

func (e *ESSH) E下载文件(远程文件 string, 本地文件 string, fn func(进度 int)) error

func (*ESSH) E关闭

func (e *ESSH) E关闭() error

func (*ESSH) E取文件列表

func (e *ESSH) E取文件列表(远程文件夹 string) ([]string, error)

func (*ESSH) E执行命令

func (e *ESSH) E执行命令(命令 string) (string, error)

func (*ESSH) E执行命令2

func (e *ESSH) E执行命令2(命令 string, fn func(回调信息 string) bool) error

func (*ESSH) E连接服务器

func (e *ESSH) E连接服务器(服务器IP地址 string, 端口 int, 用户名 string, 密码 string) error

type ESSHI

type ESSHI interface {
	E连接服务器(服务器IP地址 string, 端口 int, 用户名 string, 密码 string) error
	E执行命令(命令 string) (string, error)
	E执行命令2(命令 string, fn func(回调信息 string) bool) error
	E关闭() error
	E上传文件(本地文件 string, 远程文件 string, fn func(进度 int)) error
	E下载文件(远程文件 string, 本地文件 string, fn func(进度 int)) error
	E取文件列表(远程文件夹 string) ([]string, error)
}

Jump to

Keyboard shortcuts

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