http

package
v0.0.0-...-fee78ac Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DEFALUT_SSH_PATH = ".ssh"
View Source
const DEFALUT_SSH_PORT = 22

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHClient

type SSHClient struct {
	Host           string
	User           string
	Port           int
	Password       string
	PrivateKeyFile string
	Passphrase     string
	// contains filtered or unexported fields
}

func NewSSHClient

func NewSSHClient(host, user, sshPort string) (*SSHClient, error)

func (*SSHClient) Close

func (s *SSHClient) Close() error

func (*SSHClient) Connect

func (s *SSHClient) Connect() (*ssh.Client, error)

func (*SSHClient) Exec

func (s *SSHClient) Exec(cmd string) (string, error)

func (*SSHClient) SetPassword

func (s *SSHClient) SetPassword(password string)

func (*SSHClient) SetPrivateKeyFile

func (s *SSHClient) SetPrivateKeyFile(keyPath string, passphrase string)

Jump to

Keyboard shortcuts

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