rcom

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

README

rcom

Remote I/O device sharing over ssh

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = log.New(ioutil.Discard, "", 0)

Functions

func AuthorizeKey

func AuthorizeKey(keyfile, authorizedKeys string) (err error)

func GenerateKey

func GenerateKey(bitsize int, keyfile string) error

func Server

func Server(linkname string, force bool) error

Types

type Config

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

type ConfigOption

type ConfigOption func(*Config) error

func Accept

func Accept(accept bool) ConfigOption

func DefaultIdentityFile

func DefaultIdentityFile(homedir string) ConfigOption

func IdentityFile

func IdentityFile(file string) ConfigOption

func KeepAlive added in v0.0.4

func KeepAlive(period time.Duration) ConfigOption

func KnownHosts

func KnownHosts(file string) ConfigOption

func Login

func Login(username string) ConfigOption

func PasswordAuth

func PasswordAuth() ConfigOption

func Port

func Port(port int) ConfigOption

func Timeout added in v0.0.4

func Timeout(timeout time.Duration) ConfigOption

type Connection

type Connection struct {
	*ssh.Client
	// contains filtered or unexported fields
}

func Connect

func Connect(hostname string, options ...ConfigOption) (*Connection, error)

func (*Connection) AttachPTY

func (conn *Connection) AttachPTY(localDev string, exec string, force bool) error

func (*Connection) Close

func (conn *Connection) Close() error

func (*Connection) Start

func (conn *Connection) Start(exec string, stdin io.Reader, stdout io.Writer, stderr io.Writer) (*ssh.Session, error)

func (*Connection) Wait added in v0.0.4

func (conn *Connection) Wait()

type PrivateKey

type PrivateKey struct {
	*rsa.PrivateKey
}

func NewPrivateKey

func NewPrivateKey(bitsize int) (*PrivateKey, error)

func (*PrivateKey) MarshalPEM

func (pk *PrivateKey) MarshalPEM() ([]byte, error)

func (*PrivateKey) PublicKey

func (pk *PrivateKey) PublicKey() (*PublicKey, error)

type PublicKey

type PublicKey struct {
	ssh.PublicKey
}

func NewPublicKey

func NewPublicKey(buf []byte) (pk *PublicKey, err error)

func (*PublicKey) Decode

func (pk *PublicKey) Decode(reader io.Reader) error

func (*PublicKey) MarshalBinary

func (pk *PublicKey) MarshalBinary() ([]byte, error)

func (*PublicKey) UnmarshalBinary

func (pk *PublicKey) UnmarshalBinary(buf []byte) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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