zcssh

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteCommand

func ExecuteCommand(user, password, host, port, command string) (string, error)

ExecuteCommand ssh连接目标服务器并远程执行命令

如果命令执行失败会返回错误

func ExecuteCommands

func ExecuteCommands(user, password, host, port string, commands []string) ([]string, error)

ExecuteCommands ssh连接目标服务器并远程执行多条命令

最后一条命令执行失败会返回错误,其他命令即使失败也不会影响后续命令的执行

Types

This section is empty.

Jump to

Keyboard shortcuts

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