sshrpc

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

sshrpc package implements the go RPC client and server over the SSH binary installed on the system. This means that SSH configuration from $HOME/.ssh/config will be used to connect and authenticate.

Upon connecting the initator expects a matching executable to be invoked. See example.

Communication happens over STDIN and STDOUT. Make sure that receiving program does not write anything to those channels.

STDERR from remote end will be forwarded to local STDERR. This can be used for logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSshRpcClient

func NewSshRpcClient(destination string, arguments ...string) (*rpc.Client, error)

Open new RPC client over SSH connection. First argument is the destination for SSH client to connect to. Second argument are the arguments to invoke. They should start-up the receiver application.

func StartReceiving

func StartReceiving(server *rpc.Server)

This function should be called on receiving end program. It will block indefinitely until SSH channel is closed.

DO NOT USE STDIN AND STDOUT.

STDERR will be linked to the initiator's STDERR and can be used for logging.

All types must be registered before invoking this function. See net/rpc documentation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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