ssh

package
v0.4.31 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NilSSHProxyServer

type NilSSHProxyServer struct{}

func (*NilSSHProxyServer) Serve

func (m *NilSSHProxyServer) Serve(ctx context.Context) error

type ProxyServerConfig

type ProxyServerConfig struct {
	Addr string     `yaml:"endpoint" required:"true"`
	NPP  npp.Config `yaml:"npp" required:"true"`
}

ProxyServerConfig specifies SSH proxy server configuration.

type SSHIdentity added in v0.4.15

type SSHIdentity struct {
	Addr common.Address
	Sign []byte
}

func NewSSHIdentity added in v0.4.15

func NewSSHIdentity(key *ecdsa.PrivateKey) (*SSHIdentity, error)

func ParseSSHIdentity added in v0.4.15

func ParseSSHIdentity(v string) (*SSHIdentity, error)

func (*SSHIdentity) String added in v0.4.15

func (m *SSHIdentity) String() string

func (*SSHIdentity) Verify added in v0.4.15

func (m *SSHIdentity) Verify() error

type SSHProxyServer

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

func NewSSHProxyServer

func NewSSHProxyServer(cfg ProxyServerConfig, privateKey *ecdsa.PrivateKey, credentials *xgrpc.TransportCredentials, market blockchain.MarketAPI, log *zap.SugaredLogger) (*SSHProxyServer, error)

NewSSHProxyServer constructs a new SSH proxy server that will serve SSH connections in remote containers by smart-forwarding traffic via itself.

The server requires SSH agent running on the host system with appropriate keys loaded in it. While running it will NOT modify the data within the agent.

Example of external usage: "ssh <DealID>.<TaskID>@<host> -p <port>".

func (*SSHProxyServer) Serve

func (m *SSHProxyServer) Serve(ctx context.Context) error

Serve starts serving the SSH proxy server until the specified context is canceled or a critical error occurs.

Jump to

Keyboard shortcuts

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