ssh

package
v0.0.0-...-9d55863 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Escape

func Escape(in string) string

Escape adds escapes

func ParseCommands

func ParseCommands(user, passwordFile, delimiter string, commands ...string) string

ParseCommands from slice to string

Types

type Connection

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

Connection to an ssh host

func Connect

func Connect(name, host, port, user, keypath, password string) (*Connection, error)

Connect to a ssh host

func (*Connection) Close

func (c *Connection) Close() error

Close connection

func (*Connection) Send

func (c *Connection) Send(command string) (string, error)

Send commands to the ssh host

func (*Connection) SendFile

func (c *Connection) SendFile(src *os.File, dest string) error

SendFile to the ssh host

Jump to

Keyboard shortcuts

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