remote

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHClient

type SSHClient struct {
	SSH  *ssh.Client
	SFTP *sftp.Client
}

func NewSSHClient

func NewSSHClient(kp *keypairs.KeyPair, ip string) (*SSHClient, error)

NewSSHClient creates a new ssh connection to a remote server. It will attempt to connect up to 10 times with a 10-second gap to prevent a crash should the first attempt fail while the server is booting.

func (*SSHClient) CopyFromRemoteServer

func (s *SSHClient) CopyFromRemoteServer(srcPath, dstPath, filename string) (*os.File, error)

CopyFromRemoteServer uses sftp to copy a file from a remotes server to a local directory.

func (*SSHClient) SFTPClose

func (s *SSHClient) SFTPClose() error

SFTPClose just runs client.SFTPClose()

func (*SSHClient) SSHClose

func (s *SSHClient) SSHClose() error

SSHClose just runs client.SSHClose()

Jump to

Keyboard shortcuts

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