ssh

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunSSHCommand

func RunSSHCommand(host string, port int, account, password string, commands []string) (string, error)

func RunSSHCommandWithArgs added in v0.1.27

func RunSSHCommandWithArgs(host string, port int, account, password string, commands []string, clientConfig *ClientConfig) (string, error)

RunSSHCommandWithArgs @Description: add cipher\ keyExchange\ macs args, support whjz switcher, 202310 @param host @param port @param account @param password @param commands @param ciphers @param keyExchanges @param macs @return string @return error

func VerifyLogin added in v0.1.27

func VerifyLogin(host string, port int, account, password string) (bool, error)

func VerifyLoginWithArgs added in v0.1.27

func VerifyLoginWithArgs(host string, port int, account, password string, clientConfig *ClientConfig) (bool, error)

Types

type ClientConfig added in v0.1.27

type ClientConfig struct {
	KeyExchanges []string

	Ciphers []string

	MACs []string

	Timeout int64
}

ClientConfig @Description: config params of ssh client

Jump to

Keyboard shortcuts

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