package
Version:
v0.0.13
Opens a new window with list of versions in this module.
Published: Jun 6, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
func ExecuteCommand(user, password, host, port, command string) (string, error)
-
func ExecuteCommands(user, password, host, port string, commands []string) ([]string, error)
ExecuteCommand ssh连接目标服务器并远程执行命令
如果命令执行失败会返回错误
ExecuteCommands ssh连接目标服务器并远程执行多条命令
最后一条命令执行失败会返回错误,其他命令即使失败也不会影响后续命令的执行
Source Files
¶
Click to show internal directories.
Click to hide internal directories.