azssh

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LineReader

func LineReader(reader io.Reader) (<-chan string, func() error)

LineReader scans the reader line-by-line and sends those lines to the channel. The returned function can be used to obtain the first non-EOF error seen by the scanner.

Types

type Connection

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

Connection models an SSH connection

func Connect

func Connect(sshContext Context, address string) Connection

Connect connects to a machine via SSH.

func (*Connection) Close

func (c *Connection) Close()

Close closes the SSH connection.

func (*Connection) RunInstallScript

func (c *Connection) RunInstallScript()

RunInstallScript sends the install script to the VM and runs it there.

func (*Connection) SetupUsers

func (c *Connection) SetupUsers()

SetupUsers sets up the users and groups on Flamenco Manager.

func (*Connection) UploadAsFile

func (c *Connection) UploadAsFile(content []byte, filename string)

UploadAsFile sends bytes to the SSH server and stores them in a file. WARNING: the given filename must be a simple name, no spaces, no directory, no need for shell escaping.

func (*Connection) UploadLocalFile

func (c *Connection) UploadLocalFile(filename string)

UploadLocalFile reads a local file and sends it to the server via SSH. WARNING: the given filename must be a simple name, no spaces, no directory, no need for shell escaping.

func (*Connection) UploadStaticFile

func (c *Connection) UploadStaticFile(filename string)

UploadStaticFile reads a local file from 'files-static' and sends it to the server via SSH. WARNING: the given filename must be a simple name, no spaces, no directory, no need for shell escaping.

type Context

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

Context provides everything necessary to connect via SSH.

func LoadSSHContext

func LoadSSHContext() Context

LoadSSHContext tries to find a private key to load.

Jump to

Keyboard shortcuts

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