gssh

package
v0.0.0-...-04ff805 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func Dial

func Dial(address, username, password, privateKeyFile, passphrase string) (*Client, error)

Dial SSH server. privateKeyFile: private file path like .pem or .id_rsa

func (*Client) DownloadFile

func (c *Client) DownloadFile(remoteFile, localFile string) error

DownloadFile downloads file with sftp.

func (*Client) RunCommand

func (c *Client) RunCommand(cmd string) (string, error)

RunCommand executes your command and get your output as string.

func (*Client) UploadFile

func (c *Client) UploadFile(localFile, remoteFile string) error

UploadFile uploads file with sftp.

Jump to

Keyboard shortcuts

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