ssh

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFileBusy = errors.New("file already exists and is busy, try disabling plugin first")
View Source
var ErrNoPermissions = errors.New("cannot write file into directory, SSH user has insufficient permissions")
View Source
var ErrNotFound = errors.New("directory not found, ensure it exists")

Functions

This section is empty.

Types

type VaultSSHClient

type VaultSSHClient interface {
	// CheckOSArch returns the os type and architecture
	CheckOSArch() (string, string, error)
	// WriteFile writes a file to the SSH server, overwriting what's already there
	WriteFile(sourceFile io.Reader, hostDestination string) error
	// FileExists checks whether a file exists on a server over SSH
	FileExists(filepath string) (bool, error)
	// AddIPCLockCapabilityToFile attempts to call setcap over SSH to add IPC_LOCK capability to an executable. Requires
	// sudo privileges
	AddIPCLockCapabilityToFile(filename string) error
	// IsIPCLockCapabilityOnFile calls getcap over SSH to check whether an executable has IPC_LOCK capability
	IsIPCLockCapabilityOnFile(filename string) (bool, error)
	// Close closes the underlying SSH connection
	Close() error
}

VaultSSHClient represents a Vault server and the operations available on it over an SSH Connection. For operations involving the Vault API, see the vault/api/VaultAPIClient interface instead

func NewClient

func NewClient(address, username, password string) (VaultSSHClient, error)

Jump to

Keyboard shortcuts

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