gossh

package
v0.0.0-...-0350b0b Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SSHAgent

func SSHAgent() ssh.AuthMethod

SSHAgent is a programmatic client that talks to the ssh agent.

Types

type SshProgClient

type SshProgClient struct {
	Host   string
	Port   int
	Config *ssh.ClientConfig
}

SshProgClient is an ssh client designed to do remote commands or RPC's

func NewSshProgClient

func NewSshProgClient(host string, port int, config *ssh.ClientConfig) (client *SshProgClient)

NewSshProgClient creates a client for the given host, port, and config.

func SshClient

func SshClient(hostname string, port int, username string) (client *SshProgClient, err error)

SshClient generates an SSH client for talking to the provisioning server

func (*SshProgClient) RpcCall

func (c *SshProgClient) RpcCall(input []byte, stdout, stderr io.Writer) (err error)

RpcCall flings bytes at a remote server over SSH to STDIN, and receives whatever that server decides to send back on STDOUT and STDERR. What you send it, and what you do with the reply is between you and the server.

func (*SshProgClient) SCPFile

func (c *SshProgClient) SCPFile(content string, filename string) (err error)

SCPFile copies a file via SCP to the remote host.

Jump to

Keyboard shortcuts

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