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 ¶
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 ¶
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.